global: fix parent global

Only use the global of the owner as the parent if we don't already
have a parent.
This commit is contained in:
Wim Taymans 2018-02-09 18:13:19 +01:00
parent 70687e466d
commit 001e693e5c

View file

@ -106,7 +106,7 @@ pw_global_register(struct pw_global *global,
struct pw_core *core = global->core; struct pw_core *core = global->core;
global->owner = owner; global->owner = owner;
if (owner) if (owner && parent == NULL)
parent = owner->global; parent = owner->global;
if (parent == NULL) if (parent == NULL)
parent = core->global; parent = core->global;