]> spindle.queued.net Git - midori/commitdiff
Check if there really is a SearchAction proxy
authorChristian Dywan <christian@twotoasts.de>
Thu, 19 Feb 2009 22:36:04 +0000 (23:36 +0100)
committerChristian Dywan <christian@twotoasts.de>
Thu, 19 Feb 2009 22:36:04 +0000 (23:36 +0100)
midori/midori-searchaction.c

index 67772f963f2f9732d4307be903f8af4c22992071..a7a16fc5a3cc3be0dae0d9479b38c1ecf3cc95b5 100644 (file)
@@ -1070,7 +1070,8 @@ midori_search_action_get_dialog (MidoriSearchAction* search_action)
         return search_action->dialog;
 
     dialog_title = _("Manage Search Engines");
-    toplevel = gtk_widget_get_toplevel (search_action->last_proxy);
+    toplevel = search_action->last_proxy ?
+        gtk_widget_get_toplevel (search_action->last_proxy) : NULL;
     dialog = gtk_dialog_new_with_buttons (dialog_title,
         toplevel ? GTK_WINDOW (toplevel) : NULL,
         GTK_DIALOG_DESTROY_WITH_PARENT | GTK_DIALOG_NO_SEPARATOR,