From a6a4f0ffec4e3ebfa97ff19f0320a3c52a6321b2 Mon Sep 17 00:00:00 2001 From: Christian Dywan Date: Sun, 13 Dec 2009 15:59:54 +0100 Subject: [PATCH] Make sure there is an URI when spawning private browsing This is mainly an issue for unit tests. --- midori/midori-browser.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/midori/midori-browser.c b/midori/midori-browser.c index 87196f71..97b4a824 100644 --- a/midori/midori-browser.c +++ b/midori/midori-browser.c @@ -2170,8 +2170,9 @@ _action_private_browsing_activate (GtkAction* action, MidoriBrowser* browser) { const gchar* uri = midori_browser_get_current_uri (browser); - /* FIXME: Use the same binary that is running right now */ - sokoke_spawn_program ("midori -a", uri, FALSE); + if (uri != NULL) + /* FIXME: Use the same binary that is running right now */ + sokoke_spawn_program ("midori -a", uri, FALSE); } static void