mirror of
https://github.com/irssi/irssi.git
synced 2026-08-09 03:40:16 +02:00
Merge pull request #191 from dgl/config-error
Die if the wrong type of node is found when traversing config
This commit is contained in:
commit
b2fe861156
1 changed files with 6 additions and 0 deletions
|
|
@ -109,6 +109,12 @@ CONFIG_NODE *config_node_traverse(CONFIG_REC *rec, const char *section, int crea
|
|||
}
|
||||
g_strfreev(list);
|
||||
|
||||
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?");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* save to cache */
|
||||
str = g_strdup(section);
|
||||
g_hash_table_insert(rec->cache, str, node);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue