aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2014-06-02 14:07:18 +0200
committerGerd Hoffmann <kraxel@redhat.com>2014-06-10 12:36:36 +0200
commit333cb18ff4aaf249b2e81a376bee2b15370f4784 (patch)
treee7e04900a51003b0b1af23213cc24336ff08707b
parenta1d2db08d8421793130c59dcd54631a7425686fb (diff)
downloadqemu-arm-333cb18ff4aaf249b2e81a376bee2b15370f4784.tar.gz
console: fix -vga none -sdl crash
Call get_alloc_displaystate() for proper initialization instead of allocating with g_new(). Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
-rw-r--r--ui/console.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/ui/console.c b/ui/console.c
index b5dac64125..7dc4c1414c 100644
--- a/ui/console.c
+++ b/ui/console.c
@@ -1580,10 +1580,7 @@ DisplayState *init_displaystate(void)
gchar *name;
int i;
- if (!display_state) {
- display_state = g_new0(DisplayState, 1);
- }
-
+ get_alloc_displaystate();
for (i = 0; i < nb_consoles; i++) {
if (consoles[i]->console_type != GRAPHIC_CONSOLE &&
consoles[i]->ds == NULL) {