]> spindle.queued.net Git - midori/commitdiff
Make sure there is an URI when spawning private browsing
authorChristian Dywan <christian@twotoasts.de>
Sun, 13 Dec 2009 14:59:54 +0000 (15:59 +0100)
committerChristian Dywan <christian@twotoasts.de>
Sun, 13 Dec 2009 14:59:54 +0000 (15:59 +0100)
This is mainly an issue for unit tests.

midori/midori-browser.c

index 87196f719acd76abb965671a2f982b204ce1b7a4..97b4a824a26923f25ed1e33ab5f04bde0ceb2f5e 100644 (file)
@@ -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