From: Christian Dywan Date: Sat, 21 Nov 2009 05:39:18 +0000 (+0100) Subject: Bail out of BookmarksImport action if no bookmarks or hidden browser X-Git-Url: https://spindle.queued.net/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0af9c0cc9dd19551f185f00ac211ceb5ed3f765f;p=midori Bail out of BookmarksImport action if no bookmarks or hidden browser --- diff --git a/midori/midori-browser.c b/midori/midori-browser.c index be6925af..123202cb 100644 --- a/midori/midori-browser.c +++ b/midori/midori-browser.c @@ -4080,6 +4080,9 @@ _action_bookmarks_import_activate (GtkAction* action, guint i; KatzeItem* item; + if (!browser->bookmarks || !GTK_WIDGET_VISIBLE (browser)) + return; + dialog = gtk_dialog_new_with_buttons ( _("Import bookmarks..."), GTK_WINDOW (browser), GTK_DIALOG_DESTROY_WITH_PARENT | GTK_DIALOG_NO_SEPARATOR,