From 67583f39b58f302959d215a48734a5167f7c50ef Mon Sep 17 00:00:00 2001 From: Andrej Kacian Date: Sun, 22 Jul 2018 18:55:18 +0200 Subject: [PATCH] When deleting an account, cancel its autocheck timer. --- src/account.c | 3 +++ src/inc.c | 1 + 2 files changed, 4 insertions(+) diff --git a/src/account.c b/src/account.c index aa626ad49..6fb22b69e 100644 --- a/src/account.c +++ b/src/account.c @@ -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(); diff --git a/src/inc.c b/src/inc.c index 473e11e83..d7a4fc554 100644 --- 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; -- 2.25.1