[gtk/window-destroy: 8/18] testsuite: Clean up unexpected children
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/window-destroy: 8/18] testsuite: Clean up unexpected children
- Date: Mon, 11 May 2020 15:26:04 +0000 (UTC)
commit 4f1df235cc4b7d5bcd8b106059e6ecbe481a5bcf
Author: Matthias Clasen <mclasen redhat com>
Date: Sat May 9 17:31:18 2020 -0400
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 a07526cbf67..b153d756147 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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]