When deleting an account, cancel its autocheck timer.
authorAndrej Kacian <ticho@claws-mail.org>
Sun, 22 Jul 2018 16:55:18 +0000 (18:55 +0200)
committerAndrej Kacian <ticho@claws-mail.org>
Sun, 22 Jul 2018 16:55:18 +0000 (18:55 +0200)
src/account.c
src/inc.c

index aa626ad..6fb22b6 100644 (file)
@@ -1137,6 +1137,9 @@ static void account_delete(GtkWidget *widget, gpointer data)
                folder_destroy(FOLDER(ac_prefs->folder));
                folderview_set_all();
        }
+
+       inc_account_autocheck_timer_remove(ac_prefs);
+
        account_destroy(ac_prefs);
        account_list_view_set();
 
index 473e11e..d7a4fc5 100644 (file)
--- a/src/inc.c
+++ b/src/inc.c
@@ -1567,6 +1567,7 @@ void inc_account_autocheck_timer_remove(PrefsAccount *account)
        cm_return_if_fail(account != NULL);
 
        if (account->autocheck_timer != 0) {
+               g_source_remove(account->autocheck_timer);
                debug_print("INC: account %d: removed inc timer %d\n", account->account_id,
                                account->autocheck_timer);
                account->autocheck_timer = 0;