mirror of
https://github.com/irssi/irssi.git
synced 2024-12-04 14:46:39 -05:00
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.
This commit is contained in:
parent
96d4fb9156
commit
af6b789d2a
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user