From 178f821b27fd31a5059d76a9ccc0cf9ff551e35b Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 11 Nov 2010 22:11:03 -0600 Subject: Clearing the events before unrefing --- tests/test-libappindicator.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'tests') diff --git a/tests/test-libappindicator.c b/tests/test-libappindicator.c index 7a1976c..ece2df0 100644 --- a/tests/test-libappindicator.c +++ b/tests/test-libappindicator.c @@ -267,6 +267,13 @@ test_libappindicator_set_menu (void) g_assert(label != NULL); g_assert(g_strcmp0(label, "Test Label") == 0); + /* Interesting, eh? We need this because we send out events on the bus + but they don't come back until the idle is run. So we need those + events to clear before removing the object */ + while (g_main_context_pending(NULL)) { + g_main_context_iteration(NULL, TRUE); + } + g_object_unref(G_OBJECT(ci)); return; } -- cgit v1.2.3