]> spindle.queued.net Git - midori/commitdiff
Only re-attach KatzeHttpCookies if it existed before
authorChristian Dywan <christian@twotoasts.de>
Fri, 29 Oct 2010 20:27:42 +0000 (22:27 +0200)
committerChristian Dywan <christian@twotoasts.de>
Fri, 29 Oct 2010 20:27:42 +0000 (22:27 +0200)
midori/main.c

index 45fb90694c361c8e9af1c6b0e10f6c960609de5f..74adc1567bd88838e5e53e80373ace4a96a660e0 100644 (file)
@@ -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