Skip to content
Commit 9272707a authored by Alberto Garcia's avatar Alberto Garcia Committed by Michael Roth
Browse files

sdl2: fix crash in handle_windowevent() when restoring the screen size



The Ctrl-Alt-u keyboard shortcut restores the screen to its original
size. In the SDL2 UI this is done by destroying the window and
creating a new one. The old window emits SDL_WINDOWEVENT_HIDDEN when
it's destroyed, but trying to call SDL_GetWindowFromID() from that
event's window ID returns a null pointer. handle_windowevent() assumes
that the pointer is never null so it results in a crash.

Cc: qemu-stable@nongnu.org
Signed-off-by: default avatarAlberto Garcia <berto@igalia.com>
Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
(cherry picked from commit 08d49df0)
Signed-off-by: default avatarMichael Roth <mdroth@linux.vnet.ibm.com>
parent c759f1a0
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment