Fix server crash when a client dies during a drag with an icon
authorAnder Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Thu, 1 Mar 2012 12:09:42 +0000 (14:09 +0200)
committerKristian Høgsberg <krh@bitplanet.net>
Thu, 1 Mar 2012 16:52:05 +0000 (11:52 -0500)
commite7f6c509e2bc6437c858f95b37effee619bdfe17
treec23428b9aa754a68a0500ed426023f00f27ac7b4
parentcb3e102620a4c8c1599b6e98fb1a37989f16f2ae
Fix server crash when a client dies during a drag with an icon

If a client dies during a drag that it started using an icon surface,
the server could crash because the icon surface is not valid anymore.

Fix this by using a destroy listener to reset device->drag_surface to
nil when the surface is destroyed.
src/data-device.c
src/wayland-server.h