[epiphany] ephy-web-view: SoupURI construction can fail for invalid URIs
- From: Xan Lopez <xan src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] ephy-web-view: SoupURI construction can fail for invalid URIs
- Date: Sun, 11 Sep 2011 23:32:52 +0000 (UTC)
commit e133d3eb3b88a711bfd3b297fc1174f465491956
Author: Xan Lopez <xlopez igalia com>
Date: Mon Sep 12 01:32:24 2011 +0200
ephy-web-view: SoupURI construction can fail for invalid URIs
Guard against that.
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 102ac24..cc5e61e 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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]