summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWim Taymans <wtaymans@redhat.com>2019-05-06 17:48:23 +0200
committerWim Taymans <wtaymans@redhat.com>2019-05-07 17:53:57 +0200
commit35c2aca706a7cee00bdea271f65a385107539866 (patch)
tree1b040bcd7fc505d1b2ffed04c9715ba76755b6ec
parent9a842e4643659bc43d0493c3fd3ed42c7c4976bd (diff)
remote: only remove the proxy id when it existed
-rw-r--r--src/pipewire/remote.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pipewire/remote.c b/src/pipewire/remote.c
index cac37a6e..ad321920 100644
--- a/src/pipewire/remote.c
+++ b/src/pipewire/remote.c
@@ -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 = {