pulse-server: handle NULL proxy

The proxy could be removed before we get the global remove so we need
to handle the case where we access an object without a proxy and
avoid a crash.
This commit is contained in:
Wim Taymans 2021-03-25 09:08:13 +01:00
parent b759f9a691
commit 5d88e072a8
2 changed files with 16 additions and 0 deletions

View file

@ -713,6 +713,8 @@ int pw_manager_set_metadata(struct pw_manager *manager,
return -ENOTSUP;
if (!SPA_FLAG_IS_SET(metadata->permissions, PW_PERM_W|PW_PERM_X))
return -EACCES;
if (metadata->proxy == NULL)
return -ENOENT;
if (type != NULL) {
va_start(args, format);