From c02e181750bfe1deecd56ad0dc3d502795d2ff6b Mon Sep 17 00:00:00 2001 From: Christian Dywan Date: Sat, 28 Feb 2009 14:02:36 +0100 Subject: [PATCH] Only disconnect signals when we actually have search engines --- midori/midori-searchaction.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/midori/midori-searchaction.c b/midori/midori-searchaction.c index b789981b..7a64e41a 100644 --- a/midori/midori-searchaction.c +++ b/midori/midori-searchaction.c @@ -1024,12 +1024,15 @@ static void midori_search_action_treeview_destroy_cb (GtkWidget* treeview, MidoriSearchAction* search_action) { - g_signal_handlers_disconnect_by_func ( - search_action->search_engines, - midori_search_action_dialog_engines_add_item_cb, search_action); - g_signal_handlers_disconnect_by_func ( - search_action->search_engines, - midori_search_action_dialog_engines_remove_item_cb, search_action); + if (search_action->search_engines) + { + g_signal_handlers_disconnect_by_func ( + search_action->search_engines, + midori_search_action_dialog_engines_add_item_cb, search_action); + g_signal_handlers_disconnect_by_func ( + search_action->search_engines, + midori_search_action_dialog_engines_remove_item_cb, search_action); + } } /**