aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2015-06-11 14:40:25 +0100
committerPeter Maydell <peter.maydell@linaro.org>2015-06-11 14:40:25 +0100
commitafa25c4bb5bd0732dca4aa0691fd4682d242925f (patch)
tree199c41987c2e4e4fbf5c5da2eea120ce8f5a6034
parent0b70743d4f4f260b2fe6ed53fecc6bc6cda13910 (diff)
parent08d49df0dbaacc220a099dbfb644e1dc0eda57be (diff)
Merge remote-tracking branch 'remotes/kraxel/tags/pull-sdl-20150611-1' into staging
sdl2: fix crash in handle_windowevent() when restoring the screen size # gpg: Signature made Thu Jun 11 08:57:38 2015 BST using RSA key ID D3E87138 # gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>" # gpg: aka "Gerd Hoffmann <gerd@kraxel.org>" # gpg: aka "Gerd Hoffmann (private) <kraxel@gmail.com>" * remotes/kraxel/tags/pull-sdl-20150611-1: sdl2: fix crash in handle_windowevent() when restoring the screen size Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
-rw-r--r--ui/sdl2.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/ui/sdl2.c b/ui/sdl2.c
index 2d601798ea..5cb75aa364 100644
--- a/ui/sdl2.c
+++ b/ui/sdl2.c
@@ -521,6 +521,10 @@ static void handle_windowevent(SDL_Event *ev)
{
struct sdl2_console *scon = get_scon_from_window(ev->window.windowID);
+ if (!scon) {
+ return;
+ }
+
switch (ev->window.event) {
case SDL_WINDOWEVENT_RESIZED:
{