remote: only remove the proxy id when it existed

This commit is contained in:
Wim Taymans 2019-05-06 17:48:23 +02:00
parent 7670ee7eec
commit 5d2f0f5182

View file

@ -181,10 +181,10 @@ static void core_event_remove_id(void *data, uint32_t id)
struct pw_proxy *proxy;
pw_log_debug("remote %p: object remove %u", this, id);
if ((proxy = pw_map_lookup(&this->objects, id)) != NULL)
if ((proxy = pw_map_lookup(&this->objects, id)) != NULL) {
pw_proxy_destroy(proxy);
pw_map_remove(&this->objects, id);
pw_map_remove(&this->objects, id);
}
}
static void