talons

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

commit 02730a60e1c7b77131558661f2ad163d0bde6c26
parent 78723ba10749e4ef3a8d6bcd8f0af70ecbc7cfc7
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 @@ -390,11 +390,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);