mirror of
https://github.com/yawut/SDL.git
synced 2026-07-18 17:01:19 -05:00
Wayland: Fixed fault in event handling which might have caused a crash someday.
Found by Cppcheck.
This commit is contained in:
parent
b63b631908
commit
34b4ed61a7
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user