From: Christian Dywan Date: Sat, 21 Nov 2009 05:45:01 +0000 (+0100) Subject: Check that new-window did return a browser before adding a tab X-Git-Url: https://spindle.queued.net/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6ed99001fc3dcc55dbafeb999358a66e39df13d8;p=midori Check that new-window did return a browser before adding a tab --- diff --git a/midori/midori-browser.c b/midori/midori-browser.c index f734c2f6..bfc1e7a4 100644 --- a/midori/midori-browser.c +++ b/midori/midori-browser.c @@ -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