mirror of
https://github.com/irssi/irssi.git
synced 2025-04-26 21:11:19 -05: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:
parent
0a1282765e
commit
4282f07347
@ -197,6 +197,8 @@ char *config_node_get_str(CONFIG_NODE *parent, const char *key, const char *def)
|
|||||||
{
|
{
|
||||||
CONFIG_NODE *node;
|
CONFIG_NODE *node;
|
||||||
|
|
||||||
|
if (parent == NULL) return (char *) def;
|
||||||
|
|
||||||
node = config_node_find(parent, key);
|
node = config_node_find(parent, key);
|
||||||
return (node == NULL || !has_node_value(node)) ? def : node->value;
|
return (node == NULL || !has_node_value(node)) ? def : node->value;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user