From 14e6724ec71b08a88dca138c4de10ad695430dfd Mon Sep 17 00:00:00 2001 From: Daniel Silverstone Date: Sun, 29 Jul 2018 15:00:58 +0100 Subject: Cleanups in the DOMTS should be safe --- test/DOMTSHandler.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/DOMTSHandler.pm b/test/DOMTSHandler.pm index 5022db9..3cf0b7a 100644 --- a/test/DOMTSHandler.pm +++ b/test/DOMTSHandler.pm @@ -1605,7 +1605,7 @@ sub addto_cleanup { if (exists $unref_prefix{$type}) { $prefix = $unref_prefix{$type}; } - push(@{$self->{unref}}, $prefix."_unref(".$var.");\n"); + push(@{$self->{unref}}, "if (".$var." != NULL) { ".$prefix."_unref(".$var."); ".$var." = NULL; }\n"); } } -- cgit v1.2.3