Only re-attach KatzeHttpCookies if it existed before

This commit is contained in:
Christian Dywan 2010-10-29 22:27:42 +02:00
parent 949f38fb58
commit 064ac4418b

View file

@ -1581,9 +1581,12 @@ midori_clear_web_cookies_cb (void)
} }
g_slist_free (cookies); g_slist_free (cookies);
/* Removing KatzeHttpCookies makes it save outstanding changes */ /* Removing KatzeHttpCookies makes it save outstanding changes */
if (soup_session_get_feature (session, KATZE_TYPE_HTTP_COOKIES))
{
soup_session_remove_feature_by_type (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); soup_session_add_feature_by_type (session, KATZE_TYPE_HTTP_COOKIES);
} }
}
#ifdef GDK_WINDOWING_X11 #ifdef GDK_WINDOWING_X11
static void static void