qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] console: fix -vga none -sdl crash


From: BALATON Zoltan
Subject: Re: [Qemu-devel] [PATCH] console: fix -vga none -sdl crash
Date: Tue, 3 Jun 2014 11:45:00 +0200 (CEST)
User-agent: Alpine 2.02 (LMD 1266 2009-07-14)



On Mon, 2 Jun 2014, Gerd Hoffmann wrote:
Call get_alloc_displaystate() for proper initialization
instead of allocating with g_new().

Signed-off-by: Gerd Hoffmann <address@hidden>

Tested-by: BALATON Zoltan <address@hidden>

---
ui/console.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/ui/console.c b/ui/console.c
index 3bc18cf..2467ce4 100644
--- a/ui/console.c
+++ b/ui/console.c
@@ -1547,10 +1547,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) {
--
1.8.3.1





reply via email to

[Prev in Thread] Current Thread [Next in Thread]