talons

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

commit 9eb1c969c85d38b31c12ec188eec8932e522a45d
parent 1d4d909086774759d9059b1a9485d1b3f7bcf3d4
Author: Andrej Kacian <ticho@claws-mail.org>
Date:   Sun,  9 Apr 2017 18:31:52 +0200

Fix GUI not updating after deleting a tag.

Fixes bug #3744 - Crash upon deleting tags.

Diffstat:
Msrc/edittags.c | 7+++++++
1 file changed, 7 insertions(+), 0 deletions(-)

diff --git a/src/edittags.c b/src/edittags.c @@ -225,6 +225,13 @@ static void apply_popup_delete (GtkAction *action, gpointer data) gtk_tree_model_get(model, &sel, TAG_DATA, &id, -1); + + /* Even though this is not documented, gtk_tree_model_get() + * seems to invalidate the GtkTreeIter that is passed to it, + * so we need to reacquire it. */ + if (!gtk_tree_selection_get_selected(selection, NULL, &sel)) + return; + gtk_list_store_remove(GTK_LIST_STORE(model), &sel); if (mainwindow_get_mainwindow() != NULL) summaryview = mainwindow_get_mainwindow()->summaryview;