Probably fix bug #3050, "Claws mail closes when one attempts to delete a tag"
authorColin Leroy <colin@colino.net>
Tue, 8 Apr 2014 14:42:25 +0000 (16:42 +0200)
committerColin Leroy <colin@colino.net>
Tue, 8 Apr 2014 14:42:25 +0000 (16:42 +0200)
src/edittags.c

index cba893e472fc6743ee9216cb9d165fa5f04a9902..dd74e13f5ab805fac05bad3bbfee98b4618dbb1a 100644 (file)
@@ -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?"),