policy-node: don't crash without metadata

This commit is contained in:
Wim Taymans 2021-02-19 17:54:31 +01:00
parent 72e03e3dc8
commit 3673265ae2

View file

@ -810,6 +810,9 @@ static void refresh_auto_default_nodes(struct impl *impl)
{ {
struct default_node *def; struct default_node *def;
if (impl->session->metadata == NULL)
return;
/* Auto set default nodes */ /* Auto set default nodes */
for (def = impl->defaults; def->key != NULL; ++def) { for (def = impl->defaults; def->key != NULL; ++def) {
struct node *node; struct node *node;