Commit f497f140d9fc947621d7e008ea0dc6b21c9e5642

Authored by aliguori
1 parent 68f00996

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 <stefano.stabellini@eu.citrix.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6390 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 1 changed file with 2 additions and 0 deletions
console.c
... ... @@ -1431,6 +1431,8 @@ void text_consoles_set_display(DisplayState *ds)
1431 1431 void qemu_console_resize(DisplayState *ds, int width, int height)
1432 1432 {
1433 1433 TextConsole *s = get_graphic_console(ds);
  1434 + if (!s) return;
  1435 +
1434 1436 s->g_width = width;
1435 1437 s->g_height = height;
1436 1438 if (is_graphic_console()) {
... ...