summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/web-view-schemes/normal.c2
-rw-r--r--src/web-view-schemes/view-source.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/web-view-schemes/normal.c b/src/web-view-schemes/normal.c
index d0db097..16a7361 100644
--- a/src/web-view-schemes/normal.c
+++ b/src/web-view-schemes/normal.c
@@ -43,7 +43,7 @@ match_uri(const gchar *uri)
{
/* This is a catch-all scheme handler, so match any schemes not handled
* by another handler. */
- return !g_str_has_prefix(uri, "view-source:");
+ return !uri || !g_str_has_prefix(uri, "view-source:");
}
static gchar *
diff --git a/src/web-view-schemes/view-source.c b/src/web-view-schemes/view-source.c
index f5619d1..8f7eff7 100644
--- a/src/web-view-schemes/view-source.c
+++ b/src/web-view-schemes/view-source.c
@@ -42,7 +42,7 @@ finalize(MqWebViewScheme *scheme)
static gboolean
match_uri(const gchar *uri)
{
- return g_str_has_prefix(uri, "view-source:");
+ return uri && g_str_has_prefix(uri, "view-source:");
}
static gchar *