diff --git a/src/ChangeLog b/src/ChangeLog index 4a2b1b9c..c0d64666 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2014-11-22 Darshit Shah + + * cookies.c (discard_matching_cookie): Replace defensive assert with a + logical check and error message + 2014-11-22 Darshit Shah * wget.h: Make extern declaration for program_argstring. diff --git a/src/cookies.c b/src/cookies.c index 365f8d50..289071e9 100644 --- a/src/cookies.c +++ b/src/cookies.c @@ -304,7 +304,12 @@ discard_matching_cookie (struct cookie_jar *jar, struct cookie *cookie) res = hash_table_get_pair (jar->chains, victim->domain, &chain_key, NULL); - assert (res != 0); + + if (res == 0) + { + logprintf (LOG_VERBOSE, _("Unable to get cookie for %s\n"), + victim->domain); + } if (!victim->next) { /* VICTIM was the only cookie in the chain. Destroy the