summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lib-config/set.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib-config/set.c b/src/lib-config/set.c
index 99b9583e..fdb358f9 100644
--- a/src/lib-config/set.c
+++ b/src/lib-config/set.c
@@ -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);