diff options
author | Xan Lopez <xlopez@igalia.com> | 2011-09-12 07:32:24 +0800 |
---|---|---|
committer | Xan Lopez <xlopez@igalia.com> | 2011-09-12 07:32:24 +0800 |
commit | e133d3eb3b88a711bfd3b297fc1174f465491956 (patch) | |
tree | 229c217f8ddaa8b5a0dad107715dff13a823ba47 /embed/ephy-web-view.c | |
parent | ad1a6273b4d810ff52da001a6e8db76fec6aacea (diff) | |
download | gsoc2013-epiphany-e133d3eb3b88a711bfd3b297fc1174f465491956.tar.gz gsoc2013-epiphany-e133d3eb3b88a711bfd3b297fc1174f465491956.tar.zst gsoc2013-epiphany-e133d3eb3b88a711bfd3b297fc1174f465491956.zip |
ephy-web-view: SoupURI construction can fail for invalid URIs
Guard against that.
Diffstat (limited to 'embed/ephy-web-view.c')
-rw-r--r-- | embed/ephy-web-view.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/embed/ephy-web-view.c b/embed/ephy-web-view.c index 102ac2424..cc5e61ecc 100644 --- a/embed/ephy-web-view.c +++ b/embed/ephy-web-view.c @@ -1908,7 +1908,8 @@ load_status_cb (WebKitWebView *web_view, /* FIXME: It sucks to do this here, but it's not really possible * to hook the DOM actions nicely in the about: generator. */ uri = soup_uri_new (webkit_web_view_get_uri (web_view)); - if (!g_strcmp0 (uri->scheme, "ephy-about") && + if (uri && + !g_strcmp0 (uri->scheme, "ephy-about") && !g_strcmp0 (uri->path, "applications")) { WebKitDOMDocument *document; WebKitDOMNodeList *buttons; @@ -1928,7 +1929,8 @@ load_status_cb (WebKitWebView *web_view, NULL); } - soup_uri_free (uri); + if (uri) + soup_uri_free (uri); } break; |