From 064ac4418b293635dcf4a04c7d3928059a98ba59 Mon Sep 17 00:00:00 2001 From: Christian Dywan Date: Fri, 29 Oct 2010 22:27:42 +0200 Subject: [PATCH] Only re-attach KatzeHttpCookies if it existed before --- midori/main.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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