From: Christian Dywan Date: Wed, 1 Apr 2009 22:02:58 +0000 (+0200) Subject: Don't try to check the prefix of a NULL URI X-Git-Url: https://spindle.queued.net/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2d0e3b4c7ec97b682f1aa91ba4658ba4b0874721;p=midori Don't try to check the prefix of a NULL URI --- diff --git a/midori/midori-view.c b/midori/midori-view.c index 7d710178..4c6fcf5e 100644 --- a/midori/midori-view.c +++ b/midori/midori-view.c @@ -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://"))