commit a2394c03d010ef98197837d509d3d4c7265234bd
parent 9278a0825e350d0bb2502c6f8760be3f47565993
Author: Andrej Kacian <ticho@claws-mail.org>
Date: Sun, 23 Sep 2018 16:44:45 +0200
Add a NULL check in summary_select_by_msg_list when selecting tree nodes.
This fixes an assertion failure when executing an action
which moves selected messages to a different folder. We
obviously cannot select previously selected messages if
they're not in current folder anymore.
Diffstat:
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/summaryview.c b/src/summaryview.c
@@ -2225,7 +2225,8 @@ void summary_select_by_msg_list(SummaryView *summaryview, GSList *msginfos)
for(walk = msgnum_list; walk; walk = walk->next) {
GtkCMCTreeNode *node;
node = summary_find_msg_by_msgnum(summaryview, GPOINTER_TO_UINT(walk->data));
- gtk_cmctree_select(ctree, node);
+ if (node != NULL)
+ gtk_cmctree_select(ctree, node);
}
END_LONG_OPERATION(summaryview);
g_slist_free(msgnum_list);