From af6b789d2a6cadce0b8050f9233cacb1d0595913 Mon Sep 17 00:00:00 2001 From: Ailin Nemui Date: Tue, 17 Feb 2015 09:41:26 +0100 Subject: 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. --- src/lib-config/get.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/lib-config') 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; } -- cgit v1.2.3