]> spindle.queued.net Git - midori/commitdiff
Don't try to check the prefix of a NULL URI
authorChristian Dywan <christian@twotoasts.de>
Wed, 1 Apr 2009 22:02:58 +0000 (00:02 +0200)
committerChristian Dywan <christian@twotoasts.de>
Wed, 1 Apr 2009 22:02:58 +0000 (00:02 +0200)
midori/midori-view.c

index 7d7101786f9025d5a6a8e762986a9486e43b0bdd..4c6fcf5eac2c8fdd9d2c55c7fc8e04cd858507b2 100644 (file)
@@ -2395,6 +2395,8 @@ midori_view_can_view_source (MidoriView* view)
         && !g_strrstr (view->mime_type, "xml"))
         return FALSE;
 
+    if (!uri)
+        return FALSE;
     if (g_str_has_prefix (uri, "http://") || g_str_has_prefix (uri, "https://"))
         return TRUE;
     if (g_str_has_prefix (uri, "file://"))