Wayland: Fixed fault in event handling which might have caused a crash someday.
Found by Cppcheck.
--- a/src/video/wayland/SDL_waylandevents.c Wed Mar 02 20:25:09 2016 +0100
+++ b/src/video/wayland/SDL_waylandevents.c Wed Mar 02 20:25:23 2016 +0100
@@ -302,9 +302,9 @@
window = wl_surface_get_user_data(surface);
- input->keyboard_focus = window;
- window->keyboard_device = input;
if (window) {
+ input->keyboard_focus = window;
+ window->keyboard_device = input;
SDL_SetKeyboardFocus(window->sdlwindow);
}
}