diff --git a/gio/gtestdbus.c b/gio/gtestdbus.c index 0b4ef6b87..bff39f1b0 100644 --- a/gio/gtestdbus.c +++ b/gio/gtestdbus.c @@ -93,13 +93,15 @@ _g_object_unref_and_wait_weak_notify (gpointer object) g_main_loop_run (data.loop); - g_source_remove (timeout_id); - if (data.timed_out) { g_warning ("Weak notify timeout, object ref_count=%d\n", G_OBJECT (object)->ref_count); } + else + { + g_source_remove (timeout_id); + } g_main_loop_unref (data.loop); return data.timed_out;