From fbee8c5ba3fbeb23fb1e37b84700c48207213eec Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Tue, 21 Jul 2015 20:40:46 -0400 Subject: GtkSearchEngine: Be more robust in cancellation cases When the search is cancelled, we may end up with a tracker dbus reply coming in after the GtkSearchEngine object is already gone, and bad things happen. Prevent this by using g_signal_connect_object instead of g_signal_connect. --- gtk/gtksearchengine.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'gtk') diff --git a/gtk/gtksearchengine.c b/gtk/gtksearchengine.c index 8a92a220c1..f11ce73264 100644 --- a/gtk/gtksearchengine.c +++ b/gtk/gtksearchengine.c @@ -350,9 +350,9 @@ static void connect_engine_signals (GtkSearchEngine *engine, gpointer data) { - g_signal_connect (engine, "hits-added", G_CALLBACK (hits_added), data); - g_signal_connect (engine, "finished", G_CALLBACK (finished), data); - g_signal_connect (engine, "error", G_CALLBACK (error), data); + g_signal_connect_object (engine, "hits-added", G_CALLBACK (hits_added), data, 0); + g_signal_connect_object (engine, "finished", G_CALLBACK (finished), data, 0); + g_signal_connect_object (engine, "error", G_CALLBACK (error), data, 0); } GtkSearchEngine * -- cgit v1.2.1