From 737dfa943e12cd8588f4897c31ba0800f6d322ab Mon Sep 17 00:00:00 2001 From: Diego Escalante Urrelo Date: Sat, 31 Mar 2012 19:22:36 -0500 Subject: e-web-app-utils: warn when cookies are unavailable https://bugzilla.gnome.org/show_bug.cgi?id=673270 --- lib/ephy-web-app-utils.c | 8 ++++++++ 1 file changed, 8 insertions(+) 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) { -- cgit