media-session/pulse-server: more error checks + minor fixes

This commit is contained in:
Pauli Virtanen 2021-03-27 17:03:50 +02:00
parent f330446291
commit 2681b8236b
10 changed files with 79 additions and 54 deletions

View file

@ -522,11 +522,13 @@ destroy_proxy(void *data)
{
struct object *o = data;
spa_assert(o->info);
if (o->info->events)
spa_hook_remove(&o->object_listener);
spa_hook_remove(&o->proxy_listener);
if (o->info && o->info->destroy)
if (o->info->destroy)
o->info->destroy(o);
o->this.proxy = NULL;