summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick McDermott <pj@pehjota.net>2017-10-12 15:27:33 (EDT)
committer Patrick McDermott <pj@pehjota.net>2017-10-12 15:27:33 (EDT)
commit5737590dd0cfc710f2a7cfa4f546b5c936bc4889 (patch)
tree35d2b1a36e9f67a48a03cc8e42d990b549b9e8da
parentfe1293d4638cad15b56f7df334fbbdf2ef35ae43 (diff)
downloadmarquee-5737590dd0cfc710f2a7cfa4f546b5c936bc4889.zip
marquee-5737590dd0cfc710f2a7cfa4f546b5c936bc4889.tar.gz
marquee-5737590dd0cfc710f2a7cfa4f546b5c936bc4889.tar.bz2
mq_web_view_load_uri(): Check for NULL uri
Fixes: (marquee:xxxxx): GLib-CRITICAL **: g_str_has_prefix: assertion 'str != NULL' failed ** (marquee:xxxxx): CRITICAL **: void webkit_web_view_load_uri(WebKitWebView*, const gchar*): assertion 'uri' failed
-rw-r--r--src/web-view.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/web-view.c b/src/web-view.c
index 4e96acb..c3ffbca 100644
--- a/src/web-view.c
+++ b/src/web-view.c
@@ -716,6 +716,11 @@ mq_web_view_load_uri(MqWebView *web_view, const gchar *uri)
{
gchar *rw_uri;
+ if (!uri) {
+ /* Happens during object construction. */
+ return;
+ }
+
if (web_view->uri) {
g_free(web_view->uri);
}