summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick McDermott <pj@pehjota.net>2017-09-22 03:14:35 (EDT)
committer Patrick McDermott <pj@pehjota.net>2017-09-22 03:14:35 (EDT)
commitb340df968f6a9187e3cbe4d2ba430a1d156d8576 (patch)
tree9d68d7df4925fe9a8a5b3b7e5a344e4eb96c8978
parent110426446cbb78b775a14a70fa6db54c2c29b4ef (diff)
downloadmarquee-b340df968f6a9187e3cbe4d2ba430a1d156d8576.zip
marquee-b340df968f6a9187e3cbe4d2ba430a1d156d8576.tar.gz
marquee-b340df968f6a9187e3cbe4d2ba430a1d156d8576.tar.bz2
MqTabBody: Don't load NULL URI in Web view
Fixes: ** (marquee:xxxxx): CRITICAL **: void webkit_web_view_load_uri(WebKitWebView*, const gchar*): assertion 'uri' failed
-rw-r--r--src/tab-body.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/tab-body.c b/src/tab-body.c
index b3eed22..808a10b 100644
--- a/src/tab-body.c
+++ b/src/tab-body.c
@@ -34,7 +34,9 @@ mq_tab_body_new(gchar *uri)
body = malloc(sizeof(*body));
body->web_view = WEBKIT_WEB_VIEW(webkit_web_view_new());
- webkit_web_view_load_uri(body->web_view, uri);
+ if (uri) {
+ webkit_web_view_load_uri(body->web_view, uri);
+ }
body->container = GTK_WIDGET(body->web_view);
gtk_widget_set_vexpand(body->container, TRUE);