summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDaniel Silverstone <dsilvers@digital-scurf.org>2018-07-28 10:27:15 +0100
committerDaniel Silverstone <dsilvers@digital-scurf.org>2018-07-28 10:27:15 +0100
commitcab5ff449ff11f7ca530c84eedf7238a1670d72e (patch)
treee32881d3ccd318184dc71050f61689fa730c0d22 /test
parent6ff678247eef5f5e8b2bbc20f39c73727afb3548 (diff)
downloadlibwapcaplet-cab5ff449ff11f7ca530c84eedf7238a1670d72e.tar.gz
libwapcaplet-cab5ff449ff11f7ca530c84eedf7238a1670d72e.tar.bz2
Ensure that when we test unreffing a string to deletion, we don't then unref it again
Diffstat (limited to 'test')
-rw-r--r--test/basictests.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/basictests.c b/test/basictests.c
index c23b547..7711da7 100644
--- a/test/basictests.c
+++ b/test/basictests.c
@@ -174,7 +174,8 @@ with_filled_context_setup(void)
static void
with_filled_context_teardown(void)
{
- lwc_string_unref(intern_one);
+ if (intern_one != NULL)
+ lwc_string_unref(intern_one);
lwc_string_unref(intern_two);
lwc_string_unref(intern_three);
lwc_string_unref(intern_YAY);
@@ -234,6 +235,7 @@ END_TEST
START_TEST (test_lwc_string_unref_ok)
{
lwc_string_unref(intern_one);
+ intern_one = NULL;
}
END_TEST