proxy: fix cleanup

Keep track if the proxy is still in the core object map or not
and make sure to only delete it once.

In _remove, just remove the item from the object map if the proxy
is destroyed. There is no need to call _proxy_destroy again (and
do the extra unref)
This commit is contained in:
Wim Taymans 2020-05-07 17:09:07 +02:00
parent 2c13b3ecd2
commit 3712ebc434
2 changed files with 16 additions and 8 deletions

View file

@ -807,6 +807,7 @@ struct pw_proxy {
* be removed from server */
unsigned int removed:1; /**< proxy was removed from server */
unsigned int destroyed:1; /**< proxy was destroyed by client */
unsigned int in_map:1; /**< proxy is in core object map */
struct spa_hook_list listener_list;
struct spa_hook_list object_listener_list;