diff --git a/src/pipewire/remote.c b/src/pipewire/remote.c index 544c77b68..173eb4fe9 100644 --- a/src/pipewire/remote.c +++ b/src/pipewire/remote.c @@ -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