Wayland: Fixed fault in event handling which might have caused a crash someday.
authorPhilipp Wiesemann
Wed, 02 Mar 2016 20:25:23 +0100
changeset 10099c7932bb6dcee
parent 10098 91b34fbbb88e
child 10100 a18ec339c8d3
Wayland: Fixed fault in event handling which might have caused a crash someday.

Found by Cppcheck.
src/video/wayland/SDL_waylandevents.c
     1.1 --- a/src/video/wayland/SDL_waylandevents.c	Wed Mar 02 20:25:09 2016 +0100
     1.2 +++ b/src/video/wayland/SDL_waylandevents.c	Wed Mar 02 20:25:23 2016 +0100
     1.3 @@ -302,9 +302,9 @@
     1.4   
     1.5      window = wl_surface_get_user_data(surface);
     1.6  
     1.7 -    input->keyboard_focus = window;
     1.8 -    window->keyboard_device = input;
     1.9      if (window) {
    1.10 +        input->keyboard_focus = window;
    1.11 +        window->keyboard_device = input;
    1.12          SDL_SetKeyboardFocus(window->sdlwindow);
    1.13      }
    1.14  }