From cb83843a28b5cd3adc80596a8443dcf00c250179 Mon Sep 17 00:00:00 2001 From: Christian Dywan Date: Thu, 18 Nov 2010 21:22:12 +0100 Subject: [PATCH] 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. --- midori/midori-browser.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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); -- 2.39.5