From: Gerd Hoffmann <kraxel@redhat.com>
To: qemu-devel@nongnu.org
Cc: Gerd Hoffmann <kraxel@redhat.com>, Anthony Liguori <aliguori@amazon.com>
Subject: [Qemu-devel] [PULL v2 2/5] sdl: Fix crash when calling sdl_switch() with NULL surface
Date: Thu, 12 Mar 2015 09:38:13 +0100 [thread overview]
Message-ID: <1426149496-6043-3-git-send-email-kraxel@redhat.com> (raw)
In-Reply-To: <1426149496-6043-1-git-send-email-kraxel@redhat.com>
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
This happens for example when doing ctrl-alt-u and segfaults
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
ui/sdl.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/ui/sdl.c b/ui/sdl.c
index b89182a..8bdbf52 100644
--- a/ui/sdl.c
+++ b/ui/sdl.c
@@ -135,12 +135,13 @@ static void do_sdl_resize(int width, int height, int bpp)
static void sdl_switch(DisplayChangeListener *dcl,
DisplaySurface *new_surface)
{
- PixelFormat pf = qemu_pixelformat_from_pixman(new_surface->format);
+ PixelFormat pf;
/* temporary hack: allows to call sdl_switch to handle scaling changes */
if (new_surface) {
surface = new_surface;
}
+ pf = qemu_pixelformat_from_pixman(surface->format);
if (!scaling_active) {
do_sdl_resize(surface_width(surface), surface_height(surface), 0);
--
1.8.3.1
next prev parent reply other threads:[~2015-03-12 8:38 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-12 8:38 [Qemu-devel] [PULL v2 0/5] sdl patch queue Gerd Hoffmann
2015-03-12 8:38 ` [Qemu-devel] [PULL v2 1/5] sdl: Refresh debug statements Gerd Hoffmann
2015-03-12 8:38 ` Gerd Hoffmann [this message]
2015-03-12 8:38 ` [Qemu-devel] [PULL v2 3/5] configure: opengl overhaul Gerd Hoffmann
2015-03-12 8:38 ` [Qemu-devel] [PULL v2 4/5] Allow the use of X11 from a non standard location Gerd Hoffmann
2015-03-12 8:38 ` [Qemu-devel] [PULL v2 5/5] pixman: add a bunch of PIXMAN_BE_* defines for 32bpp Gerd Hoffmann
2015-03-12 10:35 ` [Qemu-devel] [PULL v2 0/5] sdl patch queue Peter Maydell
2015-03-12 10:48 ` Gerd Hoffmann
2015-03-12 11:16 ` Peter Maydell
2015-03-12 14:54 ` Gerd Hoffmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1426149496-6043-3-git-send-email-kraxel@redhat.com \
--to=kraxel@redhat.com \
--cc=aliguori@amazon.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).