commit 2baec79262e41790484f46e9b3b9ccc5b3f49983
parent 5b2da67e96294dd8906d5231e1aa8dc0375737cc
Author: Colin Leroy <colin@colino.net>
Date: Tue, 8 Apr 2014 16:42:25 +0200
Probably fix bug #3050, "Claws mail closes when one attempts to delete a tag"
Diffstat:
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/src/edittags.c b/src/edittags.c
@@ -206,11 +206,12 @@ static void apply_popup_delete (GtkAction *action, gpointer data)
GtkTreeModel *model;
gint id;
SummaryView *summaryview = NULL;
-
- if (!gtk_tree_selection_get_selected(gtk_tree_view_get_selection
- (GTK_TREE_VIEW(applywindow.taglist)),
- &model, &sel))
- return;
+ GtkTreeSelection *selection = gtk_tree_view_get_selection
+ (GTK_TREE_VIEW(applywindow.taglist));
+ model = gtk_tree_view_get_model(GTK_TREE_VIEW(applywindow.taglist));
+
+ if (!gtk_tree_selection_get_selected(selection, NULL, &sel))
+ return;
if (alertpanel(_("Delete tag"),
_("Do you really want to delete this tag?"),