From 0af9c0cc9dd19551f185f00ac211ceb5ed3f765f Mon Sep 17 00:00:00 2001 From: Christian Dywan Date: Sat, 21 Nov 2009 06:39:18 +0100 Subject: [PATCH] Bail out of BookmarksImport action if no bookmarks or hidden browser --- midori/midori-browser.c | 3 +++ 1 file changed, 3 insertions(+) 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, -- 2.39.5