From: Christian Dywan Date: Fri, 29 Oct 2010 20:27:42 +0000 (+0200) Subject: Only re-attach KatzeHttpCookies if it existed before X-Git-Url: https://spindle.queued.net/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=064ac4418b293635dcf4a04c7d3928059a98ba59;p=midori Only re-attach KatzeHttpCookies if it existed before --- diff --git a/midori/main.c b/midori/main.c index 45fb9069..74adc156 100644 --- a/midori/main.c +++ b/midori/main.c @@ -1581,8 +1581,11 @@ midori_clear_web_cookies_cb (void) } g_slist_free (cookies); /* Removing KatzeHttpCookies makes it save outstanding changes */ - soup_session_remove_feature_by_type (session, KATZE_TYPE_HTTP_COOKIES); - soup_session_add_feature_by_type (session, KATZE_TYPE_HTTP_COOKIES); + if (soup_session_get_feature (session, KATZE_TYPE_HTTP_COOKIES)) + { + soup_session_remove_feature_by_type (session, KATZE_TYPE_HTTP_COOKIES); + soup_session_add_feature_by_type (session, KATZE_TYPE_HTTP_COOKIES); + } } #ifdef GDK_WINDOWING_X11