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 aa626ad492cb6200be9102013d880a797a4643d9..6fb22b69e59f759642f72d9c1635ad040e01b5de 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 473e11e83c9259fc20ac0de0e24451b8132685a1..d7a4fc554f432dd68001fae0bc539c9ef9e88a3c 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;