diff options
author | 2010-04-07 21:19:15 +0200 | |
---|---|---|
committer | 2010-04-07 21:19:15 +0200 | |
commit | 85f0a757e138e3ed624bbaeaa39e4e71b0107b8e (patch) | |
tree | 3b38e5fc33775a2e95b7f6e0bcc4cbdfb3b3796c | |
parent | 1a4a7495463c3f43e1124eaa4681f9e2771627be (diff) |
check if soup_cookie could be parsed successfully
-rw-r--r-- | src/uzbl-core.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/uzbl-core.c b/src/uzbl-core.c index 227e8c6..37e717f 100644 --- a/src/uzbl-core.c +++ b/src/uzbl-core.c @@ -2405,8 +2405,12 @@ void handle_cookies (SoupSession *session, SoupMessage *msg, gpointer user_data) while(p != NULL) { p = p + 1; soup_cookie = soup_cookie_parse((const char *) p, soup_uri); - if(soup_cookie->domain == NULL) soup_cookie->domain = soup_uri->host; - soup_cookie_jar_add_cookie(uzbl.net.soup_cookie_jar, soup_cookie); + if (soup_cookie) + { + if(soup_cookie->domain == NULL) + soup_cookie->domain = soup_uri->host; + soup_cookie_jar_add_cookie(uzbl.net.soup_cookie_jar, soup_cookie); + } p = strchr(p, ';'); } |