commit 67583f39b58f302959d215a48734a5167f7c50ef
parent 2af61e1324d616b7039e95ef0a220998c69df487
Author: Andrej Kacian <ticho@claws-mail.org>
Date: Sun, 22 Jul 2018 18:55:18 +0200
When deleting an account, cancel its autocheck timer.
Diffstat:
2 files changed, 4 insertions(+), 0 deletions(-)
diff --git 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
@@ -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;