shell: Fix crash when a client is destroyed during the resize grab
authorAnder Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Tue, 29 Apr 2014 14:54:03 +0000 (17:54 +0300)
committerKristian Høgsberg <krh@bitplanet.net>
Tue, 29 Apr 2014 20:33:29 +0000 (13:33 -0700)
commit9c376b54ea6f60ae10d93653132e22ef66a536d7
tree78dd34cc5e196f68b806cd2a088a6484e5aae31d
parent15f9a26bb199c3567098b1b29815cae609010957
shell: Fix crash when a client is destroyed during the resize grab

If a client exists during a resize grab, the resource for the shell
surface being resized is destroyed. The shell surface is not destroyed
immediately, however, because of the window close animation. In that
case, the compositor would crash trying to send configure events to
the surface being resized, since it would pass a NULL pointer to
wl_resource_post_event().

The code for the resize grab was already able to handle the surface
going away, so expand it to also handle the resource going away and
fix the crash.

https://bugs.freedesktop.org/show_bug.cgi?id=77344
desktop-shell/shell.c