From: Christian Dywan Date: Thu, 18 Nov 2010 20:22:12 +0000 (+0100) Subject: Open blank page if an item with no URI is passed X-Git-Url: https://spindle.queued.net/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cb83843a28b5cd3adc80596a8443dcf00c250179;p=midori Open blank page if an item with no URI is passed This avoids the very confusing situation where the session file contains no URI and critical warnings are visible. Notably MIDORI_UNARMED can cause this. --- diff --git a/midori/midori-browser.c b/midori/midori-browser.c index 77428109..cd776b52 100644 --- a/midori/midori-browser.c +++ b/midori/midori-browser.c @@ -6714,10 +6714,12 @@ midori_browser_add_item (MidoriBrowser* browser, g_return_val_if_fail (KATZE_IS_ITEM (item), -1); uri = katze_item_get_uri (item); + if (!uri) + uri = "about:blank"; title = katze_item_get_name (item); /* Blank pages should not be delayed */ if (katze_item_get_meta_integer (item, "delay") > 0 - && uri != NULL && strcmp (uri, "about:blank") != 0) + && strcmp (uri, "about:blank") != 0) { gchar* new_uri = g_strdup_printf ("pause:%s", uri); view = midori_view_new_with_uri (new_uri, title, browser->settings);