Wayland: Avoid NULL dereference after window destruction (thanks, "x414e54"!).
Fixes Bugzilla #2934.
--- a/src/video/wayland/SDL_waylandevents.c Wed May 27 10:29:43 2015 -0700
+++ b/src/video/wayland/SDL_waylandevents.c Wed May 27 18:54:06 2015 -0400
@@ -293,6 +293,12 @@
struct wl_array *keys)
{
struct SDL_WaylandInput *input = data;
+
+ if (!surface) {
+ /* enter event for a window we've just destroyed */
+ return;
+ }
+
SDL_WindowData *window = wl_surface_get_user_data(surface);
input->keyboard_focus = window;