[Xfce4-commits] <midori:master> Open blank page if an item with no URI is passed

Christian Dywan noreply at xfce.org
Thu Nov 18 23:30:03 CET 2010


Updating branch refs/heads/master
         to cb83843a28b5cd3adc80596a8443dcf00c250179 (commit)
       from 1ac006804bb0197bfaa26799565aa113ce5a0678 (commit)

commit cb83843a28b5cd3adc80596a8443dcf00c250179
Author: Christian Dywan <christian at twotoasts.de>
Date:   Thu Nov 18 21:22:12 2010 +0100

    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 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/midori/midori-browser.c b/midori/midori-browser.c
index 7742810..cd776b5 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);



More information about the Xfce4-commits mailing list