aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ephy-web-app-utils.c
diff options
context:
space:
mode:
authorDiego Escalante Urrelo <diegoe@igalia.com>2012-04-01 08:22:36 +0800
committerDiego Escalante Urrelo <diegoe@igalia.com>2012-05-27 06:25:03 +0800
commit737dfa943e12cd8588f4897c31ba0800f6d322ab (patch)
treec8807a715f2eff579b808af1a43947ea2cda170d /lib/ephy-web-app-utils.c
parent1b942ad48a848dedcb632895a1ac198c13993380 (diff)
downloadgsoc2013-epiphany-737dfa943e12cd8588f4897c31ba0800f6d322ab.tar
gsoc2013-epiphany-737dfa943e12cd8588f4897c31ba0800f6d322ab.tar.gz
gsoc2013-epiphany-737dfa943e12cd8588f4897c31ba0800f6d322ab.tar.bz2
gsoc2013-epiphany-737dfa943e12cd8588f4897c31ba0800f6d322ab.tar.lz
gsoc2013-epiphany-737dfa943e12cd8588f4897c31ba0800f6d322ab.tar.xz
gsoc2013-epiphany-737dfa943e12cd8588f4897c31ba0800f6d322ab.tar.zst
gsoc2013-epiphany-737dfa943e12cd8588f4897c31ba0800f6d322ab.zip
e-web-app-utils: warn when cookies are unavailable
https://bugzilla.gnome.org/show_bug.cgi?id=673270
Diffstat (limited to 'lib/ephy-web-app-utils.c')
-rw-r--r--lib/ephy-web-app-utils.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/ephy-web-app-utils.c b/lib/ephy-web-app-utils.c
index 7739a5328..78cbcc008 100644
--- a/lib/ephy-web-app-utils.c
+++ b/lib/ephy-web-app-utils.c
@@ -274,6 +274,14 @@ create_cookie_jar_for_domain (const char *address, const char *directory)
/* The current cookies */
session = webkit_get_default_session ();
current_jar = (SoupCookieJar*)soup_session_get_feature (session, SOUP_TYPE_COOKIE_JAR);
+
+ /* WebKit might not have a cookie jar yet, if it has not needed one
+ * and none has been set by Epiphany. */
+ if (current_jar == NULL) {
+ soup_uri_free (uri);
+ return;
+ }
+
cookies = soup_cookie_jar_all_cookies (current_jar);
for (p = cookies; p; p = p->next) {