[Commits] SDL: Wayland: Fixed fault in event handling which might have cau...

libsdl.org revision control commits-owner at libsdl.org
Wed Mar 2 11:34:39 PST 2016


details:   https://hg.libsdl.org/SDL/rev/c7932bb6dcee
changeset: 10099:c7932bb6dcee
user:      Philipp Wiesemann <philipp.wiesemann at arcor.de>
date:      Wed Mar 02 20:25:23 2016 +0100
description:
Wayland: Fixed fault in event handling which might have caused a crash someday.

Found by Cppcheck.

diffstat:

 src/video/wayland/SDL_waylandevents.c |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (15 lines):

diff -r 91b34fbbb88e -r c7932bb6dcee src/video/wayland/SDL_waylandevents.c
--- 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);
     }
 }


More information about the commits mailing list