From 466d2a84de596ef5bd748eaa133ed0bc67f4580d Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sat, 9 May 2020 17:31:18 -0400 Subject: [PATCH] testsuite: Clean up unexpected children If you call gtk_widget_set_parent on an unsuspecting parent widget, it is your reponsibility to clean up before the parent gets finalized. --- testsuite/gtk/action.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/testsuite/gtk/action.c b/testsuite/gtk/action.c index a07526cbf6..b153d75614 100644 --- a/testsuite/gtk/action.c +++ b/testsuite/gtk/action.c @@ -335,9 +335,11 @@ test_overlap2 (void) g_assert_cmpint (act1, ==, 0); g_assert_cmpint (act2, ==, 1); - gtk_widget_destroy (text); g_object_unref (group1); g_object_unref (group2); + + gtk_widget_unparent (child); + g_object_unref (g_object_ref_sink (text)); } /* Test that gtk_widget_class_query_action