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 9a842e4643
commit 35c2aca706

View file

@ -136,11 +136,11 @@ 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))) {
if ((proxy = pw_map_lookup(&this->objects, id)) != NULL) {
proxy->removed = true;
pw_proxy_destroy(proxy);
pw_map_remove(&this->objects, id);
}
pw_map_remove(&this->objects, id);
}
static const struct pw_core_proxy_events core_proxy_events = {