Wayland: Avoid NULL dereference after window destruction (thanks, "x414e54"!).
Fixes Bugzilla #2934. --HG-- extra : rebase_source : 30ce72975198991c6fc8142c31f5f32a2fc5ec13
This commit is contained in:
parent
8f0605e8f7
commit
e2d788ca24
1 changed files with 6 additions and 0 deletions
|
@ -293,6 +293,12 @@ keyboard_handle_enter(void *data, struct wl_keyboard *keyboard,
|
||||||
struct wl_array *keys)
|
struct wl_array *keys)
|
||||||
{
|
{
|
||||||
struct SDL_WaylandInput *input = data;
|
struct SDL_WaylandInput *input = data;
|
||||||
|
|
||||||
|
if (!surface) {
|
||||||
|
/* enter event for a window we've just destroyed */
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
SDL_WindowData *window = wl_surface_get_user_data(surface);
|
SDL_WindowData *window = wl_surface_get_user_data(surface);
|
||||||
|
|
||||||
input->keyboard_focus = window;
|
input->keyboard_focus = window;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue