From: aliguori Date: Wed, 21 Jan 2009 19:18:00 +0000 (+0000) Subject: re-fix screendump (Stefano Stabellini) X-Git-Tag: TizenStudio_2.0_p2.3.2~208^2~12896 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f497f140d9fc947621d7e008ea0dc6b21c9e5642;p=sdk%2Femulator%2Fqemu.git re-fix screendump (Stefano Stabellini) Removing the assumption about a single graphic console made get_graphic_console return NULL when called by vga_screen_dump. In this case returning NULL is correct but since NULL is not handled in qemu_console_resize it causes a segmentation fault. Just returning immediately from qemu_console_resize is sufficient to fix the problem. Signed-off-by: Stefano Stabellini Signed-off-by: Anthony Liguori git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6390 c046a42c-6fe2-441c-8c8c-71466251a162 --- diff --git a/console.c b/console.c index 4bc16e8..dbb3b70 100644 --- a/console.c +++ b/console.c @@ -1431,6 +1431,8 @@ void text_consoles_set_display(DisplayState *ds) void qemu_console_resize(DisplayState *ds, int width, int height) { TextConsole *s = get_graphic_console(ds); + if (!s) return; + s->g_width = width; s->g_height = height; if (is_graphic_console()) {