talons

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

commit d786e2e9e353d8dd498b4991e41f4f557dcfa66b
parent 215b6adc8aecb1d81867f144c6d8ed188827fd8d
Author: Andrej Kacian <ticho@claws-mail.org>
Date:   Sun,  4 Aug 2019 12:20:48 +0200

Fix a failed assertion in NNTP group list dialog

The code was trying to expand nodes of already subscribed
newsgroups, even if those newsgroups weren't being displayed
in the list, usually because of an active search pattern.

Diffstat:
Msrc/grouplistdialog.c | 9++++++---
1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/src/grouplistdialog.c b/src/grouplistdialog.c @@ -379,11 +379,14 @@ static GtkCMCTreeNode *grouplist_create_branch(NewsGroupInfo *ginfo, static void grouplist_expand_upwards(GtkCMCTree *ctree, const gchar *name) { const gchar *ptr; gchar *newname=g_malloc0(strlen(name)); + GtkCMCTreeNode *node; for (ptr=name; *ptr; ptr++) { - if (*ptr == '.') - gtk_cmctree_expand(ctree, - grouplist_hash_get_branch_node(newname)); + if (*ptr == '.') { + node = grouplist_hash_get_branch_node(newname); + if (node != NULL) + gtk_cmctree_expand(ctree, node); + } newname[ptr-name] = *ptr; } g_free(newname);