1
0
mirror of https://github.com/irssi/irssi.git synced 2024-09-29 04:45:57 -04:00

If config_node_get_str() is given NULL node, return the given default.

git-svn-id: http://svn.irssi.org/repos/irssi/trunk@301 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Timo Sirainen 2000-06-06 19:14:51 +00:00 committed by cras
parent 0a1282765e
commit 4282f07347

View File

@ -197,6 +197,8 @@ char *config_node_get_str(CONFIG_NODE *parent, const char *key, const char *def)
{
CONFIG_NODE *node;
if (parent == NULL) return (char *) def;
node = config_node_find(parent, key);
return (node == NULL || !has_node_value(node)) ? def : node->value;
}