[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL v3 2/5] sdl: Fix crash when calling sdl_switch() with
From: |
Gerd Hoffmann |
Subject: |
[Qemu-devel] [PULL v3 2/5] sdl: Fix crash when calling sdl_switch() with NULL surface |
Date: |
Fri, 13 Mar 2015 13:58:20 +0100 |
From: Benjamin Herrenschmidt <address@hidden>
This happens for example when doing ctrl-alt-u and segfaults
Signed-off-by: Benjamin Herrenschmidt <address@hidden>
Signed-off-by: Gerd Hoffmann <address@hidden>
---
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
- [Qemu-devel] [PULL v3 0/5] sdl patch queue., Gerd Hoffmann, 2015/03/13
- [Qemu-devel] [PULL v3 1/5] sdl: Refresh debug statements, Gerd Hoffmann, 2015/03/13
- [Qemu-devel] [PULL v3 3/5] configure: opengl overhaul, Gerd Hoffmann, 2015/03/13
- [Qemu-devel] [PULL v3 2/5] sdl: Fix crash when calling sdl_switch() with NULL surface,
Gerd Hoffmann <=
- [Qemu-devel] [PULL v3 4/5] Allow the use of X11 from a non standard location., Gerd Hoffmann, 2015/03/13
- [Qemu-devel] [PULL v3 5/5] pixman: add a bunch of PIXMAN_BE_* defines for 32bpp, Gerd Hoffmann, 2015/03/13
- Re: [Qemu-devel] [PULL v3 0/5] sdl patch queue., Peter Maydell, 2015/03/13