mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2025-10-29 05:40:16 -04:00
client: Restructure delete_id handler control flow
This makes it easier for future patches in the series, which can
possibly return NULL for extant map entries.
[daniels: Extracted from Derek's bespoke-zombie patch as an intermediate
step.]
Reviewed-by: Daniel Stone <daniels@collabora.com>
This commit is contained in:
parent
07d7a9968d
commit
712ba320db
1 changed files with 4 additions and 5 deletions
|
|
@ -836,13 +836,12 @@ display_handle_delete_id(void *data, struct wl_display *display, uint32_t id)
|
|||
|
||||
proxy = wl_map_lookup(&display->objects, id);
|
||||
|
||||
if (!proxy)
|
||||
wl_log("error: received delete_id for unknown id (%u)\n", id);
|
||||
|
||||
if (proxy && !wl_object_is_zombie(&display->objects, id))
|
||||
if (wl_object_is_zombie(&display->objects, id))
|
||||
wl_map_remove(&display->objects, id);
|
||||
else if (proxy)
|
||||
proxy->flags |= WL_PROXY_FLAG_ID_DELETED;
|
||||
else
|
||||
wl_map_remove(&display->objects, id);
|
||||
wl_log("error: received delete_id for unknown id (%u)\n", id);
|
||||
|
||||
pthread_mutex_unlock(&display->mutex);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue