]> spindle.queued.net Git - midori/commitdiff
Check that new-window did return a browser before adding a tab
authorChristian Dywan <christian@twotoasts.de>
Sat, 21 Nov 2009 05:45:01 +0000 (06:45 +0100)
committerChristian Dywan <christian@twotoasts.de>
Sat, 21 Nov 2009 05:45:01 +0000 (06:45 +0100)
midori/midori-browser.c

index f734c2f6fb9be9debcc1cae67e913128db4626e7..bfc1e7a48b293c78640d07b5968b3019b2bf2f0b 100644 (file)
@@ -2115,8 +2115,11 @@ _action_window_new_activate (GtkAction*     action,
 {
     MidoriBrowser* new_browser;
     g_signal_emit (browser, signals[NEW_WINDOW], 0, NULL, &new_browser);
-    midori_browser_add_uri (new_browser, "");
-    midori_browser_activate_action (new_browser, "Location");
+    if (new_browser)
+    {
+        midori_browser_add_uri (new_browser, "");
+        midori_browser_activate_action (new_browser, "Location");
+    }
 }
 
 static void