Skip to content

Commit

Permalink
Wayland: Fixed fault in event handling which might have caused a cras…
Browse files Browse the repository at this point in the history
…h someday.

Found by Cppcheck.
  • Loading branch information
philippwiesemann committed Mar 2, 2016
1 parent ab8be04 commit be34036
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/video/wayland/SDL_waylandevents.c
Expand Up @@ -302,9 +302,9 @@ keyboard_handle_enter(void *data, struct wl_keyboard *keyboard,

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);
}
}
Expand Down

0 comments on commit be34036

Please sign in to comment.