1
0
mirror of https://github.com/irssi/irssi.git synced 2024-12-04 14:46:39 -05:00

config_node_remove() - NULL parent is treated as root node

git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1490 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Timo Sirainen 2001-05-11 19:53:39 +00:00 committed by cras
parent f1774f1a3b
commit 8d6d0ee43e

View File

@ -34,9 +34,11 @@ static void cache_remove(CONFIG_REC *rec, CONFIG_NODE *node)
void config_node_remove(CONFIG_REC *rec, CONFIG_NODE *parent, CONFIG_NODE *node)
{
g_return_if_fail(parent != NULL);
g_return_if_fail(node != NULL);
if (parent == NULL)
parent = rec->mainnode;
rec->modifycounter++;
cache_remove(rec, node);
parent->value = g_slist_remove(parent->value, node);