compositor: fix crash when a drag surface is destroyed during the drag
authorAnder Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Thu, 1 Mar 2012 12:09:44 +0000 (14:09 +0200)
committerKristian Høgsberg <krh@bitplanet.net>
Thu, 1 Mar 2012 22:33:51 +0000 (17:33 -0500)
commitc5fb9a7de99e43c8133bfee5b5f9cd68c3241dd4
tree9afbab32b3647ae40460b04e6b8ef98ef17194d7
parent3be2ce9e494aa371b4ab37d7c6afd9d235b64bd6
compositor: fix crash when a drag surface is destroyed during the drag

This can happen for instance if the client that started the drag
crashes. Weston would crash because of the invalid surface pointed by
device->drag_surface.

Fix this by reseting the drag surface to nil on a destroy listener.
src/compositor.c
src/compositor.h