diff options
author | Patrick McDermott <pj@pehjota.net> | 2017-10-30 13:41:33 (EDT) |
---|---|---|
committer | Patrick McDermott <pj@pehjota.net> | 2017-10-30 13:41:33 (EDT) |
commit | 4a1b1a7025f4dde3dfb58a76b7fc1d7fffc0cdd4 (patch) | |
tree | 2e1e23abe0c4d57ecc7ddc3574bdddd94097cadb | |
parent | 2171858d99292f08498b2edbaddc626792e89bff (diff) | |
download | marquee-4a1b1a7025f4dde3dfb58a76b7fc1d7fffc0cdd4.zip marquee-4a1b1a7025f4dde3dfb58a76b7fc1d7fffc0cdd4.tar.gz marquee-4a1b1a7025f4dde3dfb58a76b7fc1d7fffc0cdd4.tar.bz2 |
mq_web_view_*_scheme_methods.match_uri(): Handle NULL uri arguments
-rw-r--r-- | src/web-view-schemes/normal.c | 2 | ||||
-rw-r--r-- | src/web-view-schemes/view-source.c | 2 |
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 * |