summaryrefslogtreecommitdiff
path: root/src/lib-config/get.c
diff options
context:
space:
mode:
authorAilin Nemui <ailin@linux.site>2015-02-17 09:41:26 +0100
committerAilin Nemui <ailin@linux.site>2015-02-17 09:50:55 +0100
commitaf6b789d2a6cadce0b8050f9233cacb1d0595913 (patch)
tree5872f4d187401da63b45fe270df6f62b36171230 /src/lib-config/get.c
parent96d4fb9156bcef6fc14dbec43dfa0fcd0226d46f (diff)
downloadirssi-af6b789d2a6cadce0b8050f9233cacb1d0595913.zip
Warn the user instead of crashing on wrong config
The change introduced in #191 will crash irssi immediately if you accidentally try to /reload certain broken config files. It is enough to warn the user in this case, so we turn g_error into g_critical.
Diffstat (limited to 'src/lib-config/get.c')
-rw-r--r--src/lib-config/get.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib-config/get.c b/src/lib-config/get.c
index 52785f63..e0d988d0 100644
--- a/src/lib-config/get.c
+++ b/src/lib-config/get.c
@@ -109,9 +109,9 @@ CONFIG_NODE *config_node_traverse(CONFIG_REC *rec, const char *section, int crea
}
g_strfreev(list);
- if (!is_node_list(node)) {
+ if (!is_node_list(node)) {
/* Will die. Better to not corrupt the config further in this case. */
- g_error("Attempt to use non-list node as list. Corrupt config?");
+ g_critical("Attempt to use non-list node `%s' as list. Corrupt config?", section);
return NULL;
}