|
From: | Anthony Liguori |
Subject: | Re: [Qemu-devel] [PATCH] Adds null check for DisplayStatus |
Date: | Wed, 21 Jan 2009 12:59:21 -0600 |
User-agent: | Thunderbird 2.0.0.19 (X11/20090105) |
Stefano Stabellini wrote:
Allocate a DisplaySurface in dumb_display_init if none else does it. The DisplaySurface will be used for the qemu monitor, serial and parallel ports, etc. Signed-off-by: Andrew May <address@hidden> Signed-off-by: Stefano Stabellini <address@hidden>
Applied. Thanks. Regards, Anthony Liguori
diff --git a/vl.c b/vl.c index 63d954b..b246e47 100644 --- a/vl.c +++ b/vl.c @@ -2778,6 +2778,11 @@ DisplayState *get_displaystate(void) static void dumb_display_init(void) { DisplayState *ds = qemu_mallocz(sizeof(DisplayState)); + if (ds == NULL) { + fprintf(stderr, "dumb_display_init: DisplayState allocation failed\n"); + exit(1); + } + ds->surface = qemu_create_displaysurface(640, 480, 32, 640 * 4); register_displaystate(ds); }
[Prev in Thread] | Current Thread | [Next in Thread] |