Check if there really is a SearchAction proxy

This commit is contained in:
Christian Dywan 2009-02-19 23:36:04 +01:00
parent b40b906e2e
commit 4ab9bd74e7

View file

@ -1070,7 +1070,8 @@ midori_search_action_get_dialog (MidoriSearchAction* search_action)
return search_action->dialog; return search_action->dialog;
dialog_title = _("Manage Search Engines"); 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, dialog = gtk_dialog_new_with_buttons (dialog_title,
toplevel ? GTK_WINDOW (toplevel) : NULL, toplevel ? GTK_WINDOW (toplevel) : NULL,
GTK_DIALOG_DESTROY_WITH_PARENT | GTK_DIALOG_NO_SEPARATOR, GTK_DIALOG_DESTROY_WITH_PARENT | GTK_DIALOG_NO_SEPARATOR,