From 02ebfb12761fb5a953fce068e9de3b334df8c9da Mon Sep 17 00:00:00 2001 From: Pekka Paalanen Date: Mon, 24 Oct 2011 17:34:53 +0300 Subject: [PATCH] compositor: fix drag segfault Without this fix, the dnd demo would make the demo compositor crash in shell.c:drag_offer() because resource->data is NULL. Initialise resource->data in shell_create_drag(). Signed-off-by: Pekka Paalanen --- compositor/shell.c | 1 + 1 file changed, 1 insertion(+) diff --git a/compositor/shell.c b/compositor/shell.c index 05ba7b79..50c80e9d 100644 --- a/compositor/shell.c +++ b/compositor/shell.c @@ -559,6 +559,7 @@ shell_create_drag(struct wl_client *client, drag->resource.object.implementation = (void (**)(void)) &drag_interface; + drag->resource.data = drag; drag->resource.destroy = destroy_drag; drag->drag_focus_listener.func = drag_handle_surface_destroy;