]> spindle.queued.net Git - midori/commitdiff
Bail out of Export if no bookmarks or hidden
authorChristian Dywan <christian@twotoasts.de>
Sat, 6 Mar 2010 18:16:52 +0000 (19:16 +0100)
committerChristian Dywan <christian@twotoasts.de>
Sat, 6 Mar 2010 18:16:52 +0000 (19:16 +0100)
midori/midori-browser.c

index 3f8775947a1e92f315d069566594331a9e8e496d..566b800d60202305f9543cf2d370ee48be6ccadc 100644 (file)
@@ -4648,6 +4648,9 @@ _action_bookmarks_export_activate (GtkAction*     action,
     gchar* path = NULL;
     GError* error;
 
+    if (!browser->bookmarks || !GTK_WIDGET_VISIBLE (browser))
+        return;
+
     file_dialog = sokoke_file_chooser_dialog_new (_("Save file as"),
         GTK_WINDOW (browser), GTK_FILE_CHOOSER_ACTION_SAVE);
     gtk_file_chooser_set_current_name (GTK_FILE_CHOOSER (file_dialog),