managesieve: close windows when unloading
[claws.git] / src / plugins / managesieve / sieve_editor.c
index e085dcba8f9e97b6b7bc691a1a9e538f57351e44..f8b43eeb2df6edbffbf5efbb57d53c3dfe2b2853 100644 (file)
@@ -106,8 +106,9 @@ static GtkActionEntry sieve_editor_entries[] =
 void sieve_editors_close()
 {
        if (editors) {
-               g_slist_free_full(editors, (GDestroyNotify)sieve_editor_close);
+               GSList *list = editors;
                editors = NULL;
+               g_slist_free_full(list, (GDestroyNotify)sieve_editor_close);
        }
 }