talons

Fork of Claws Mail https://www.claws-mail
Log | Files | Refs | README | LICENSE

commit 0556ba2def8a8b4adf5829c78734fa980db2d9ec
parent 0a83c86dca7e7e2cf68ced12c0d216444cc2f5c3
Author: Andrej Kacian <ticho@claws-mail.org>
Date:   Mon, 24 Apr 2017 18:59:10 +0200

Fix crash in sieve manager window when no account has sieve enabled.

The GtkComboBox gets destroyed in such case, but the 'Refresh'
button handler didn't check for that.

Diffstat:
Msrc/plugins/managesieve/sieve_manager.c | 4++++
1 file changed, 4 insertions(+), 0 deletions(-)

diff --git a/src/plugins/managesieve/sieve_manager.c b/src/plugins/managesieve/sieve_manager.c @@ -605,6 +605,9 @@ static void account_changed(GtkWidget *widget, SieveManagerPage *page) PrefsAccount *account; SieveSession *session; + if (page->accounts_menu == NULL) + return; + account_id = combobox_get_active_data(GTK_COMBO_BOX(page->accounts_menu)); account = account_find_from_id(account_id); if (!account) @@ -705,6 +708,7 @@ static SieveManagerPage *sieve_manager_page_new() if (!default_account) { gtk_widget_destroy(label); gtk_widget_destroy(accounts_menu); + accounts_menu = NULL; } /* status */