talons

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

commit 1a6b1fa9a594a13b416192e1bdc413528b39136e
parent 0492042f37449ed6e4079f9cadab3dec67bcaf63
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:
Msrc/summaryview.c | 3++-
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);