From 6ed99001fc3dcc55dbafeb999358a66e39df13d8 Mon Sep 17 00:00:00 2001 From: Christian Dywan Date: Sat, 21 Nov 2009 06:45:01 +0100 Subject: [PATCH] Check that new-window did return a browser before adding a tab --- midori/midori-browser.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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 -- 2.39.5