From: Rob Bradford <[email protected]>

If an unknown id is deleted then the lookup in the map will return NULL and
so we should avoid dereferencing that.
---
 src/wayland-client.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/wayland-client.c b/src/wayland-client.c
index 0873835..e8d3240 100644
--- a/src/wayland-client.c
+++ b/src/wayland-client.c
@@ -415,7 +415,7 @@ display_handle_delete_id(void *data, struct wl_display 
*display, uint32_t id)
        pthread_mutex_lock(&display->mutex);
 
        proxy = wl_map_lookup(&display->objects, id);
-       if (proxy != WL_ZOMBIE_OBJECT)
+       if (proxy && proxy != WL_ZOMBIE_OBJECT)
                proxy->flags |= WL_PROXY_FLAG_ID_DELETED;
        else
                wl_map_remove(&display->objects, id);
-- 
1.8.1.2

_______________________________________________
wayland-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to