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 <ppaalanen@gmail.com>
This commit is contained in:
Pekka Paalanen 2011-10-24 17:34:53 +03:00 committed by Kristian Høgsberg
parent 02924bc0b6
commit 02ebfb1276
1 changed files with 1 additions and 0 deletions

View File

@ -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;