Check that new-window did return a browser before adding a tab

This commit is contained in:
Christian Dywan 2009-11-21 06:45:01 +01:00
parent 83dbe3417f
commit 6ed99001fc

View 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