Don't try to check the prefix of a NULL URI
This commit is contained in:
parent
86292d26f9
commit
2d0e3b4c7e
1 changed files with 2 additions and 0 deletions
|
@ -2395,6 +2395,8 @@ midori_view_can_view_source (MidoriView* view)
|
||||||
&& !g_strrstr (view->mime_type, "xml"))
|
&& !g_strrstr (view->mime_type, "xml"))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
if (!uri)
|
||||||
|
return FALSE;
|
||||||
if (g_str_has_prefix (uri, "http://") || g_str_has_prefix (uri, "https://"))
|
if (g_str_has_prefix (uri, "http://") || g_str_has_prefix (uri, "https://"))
|
||||||
return TRUE;
|
return TRUE;
|
||||||
if (g_str_has_prefix (uri, "file://"))
|
if (g_str_has_prefix (uri, "file://"))
|
||||||
|
|
Loading…
Reference in a new issue