]> Git Repo - qemu.git/commit - ui/sdl2.c
sdl2: fix crash in handle_windowevent() when restoring the screen size
authorAlberto Garcia <[email protected]>
Mon, 8 Jun 2015 09:12:15 +0000 (11:12 +0200)
committerGerd Hoffmann <[email protected]>
Tue, 9 Jun 2015 08:25:21 +0000 (10:25 +0200)
commit08d49df0dbaacc220a099dbfb644e1dc0eda57be
treeb9cfaffd539431a0fff4c562dd081019eb068a34
parentee09f84e6bf5383a23c9624115c26b72aa1e076c
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: [email protected]
Signed-off-by: Alberto Garcia <[email protected]>
Signed-off-by: Gerd Hoffmann <[email protected]>
ui/sdl2.c
This page took 0.028463 seconds and 4 git commands to generate.