Commit cf89b40c authored by Pekka Paalanen's avatar Pekka Paalanen
Browse files

server: do not send delete_id to a dead client

During client tear-down, all objects are destroyed in id order.
Therefore the display object is destroyed first.

If the destroy listeners of any object destroy another object by calling
wl_resoruce_destroy(), we try to send a delete_id event to the client.
This leads to a segmentation fault without a display object.
Signed-off-by: Pekka Paalanen's avatarPekka Paalanen <>
parent 42eed323
......@@ -348,9 +348,11 @@ wl_resource_destroy(struct wl_resource *resource, uint32_t time)
struct wl_client *client = resource->client;
if (resource-> < WL_SERVER_ID_START) {
if (client->display_resource) {
wl_map_insert_at(&client->objects, resource->, NULL);
} else {
wl_map_remove(&client->objects, resource->;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment