src/video/wayland/SDL_waylandevents.c
changeset 10099 c7932bb6dcee
parent 9998 f67cf37e9cd4
child 10154 fae27a079fcb
--- 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);
     }
 }