]> spindle.queued.net Git - midori/commitdiff
Bail out of BookmarksImport action if no bookmarks or hidden browser
authorChristian Dywan <christian@twotoasts.de>
Sat, 21 Nov 2009 05:39:18 +0000 (06:39 +0100)
committerChristian Dywan <christian@twotoasts.de>
Sat, 21 Nov 2009 05:39:18 +0000 (06:39 +0100)
midori/midori-browser.c

index be6925af7a6499f58111facbde7122fd7003aeff..123202cb9c369fe3c0e066238d4a57a0e0e3cce2 100644 (file)
@@ -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,