From cab5ff449ff11f7ca530c84eedf7238a1670d72e Mon Sep 17 00:00:00 2001 From: Daniel Silverstone Date: Sat, 28 Jul 2018 10:27:15 +0100 Subject: Ensure that when we test unreffing a string to deletion, we don't then unref it again --- test/basictests.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 -- cgit v1.2.3