aboutsummaryrefslogtreecommitdiff
path: root/vl.c
diff options
context:
space:
mode:
Diffstat (limited to 'vl.c')
-rw-r--r--vl.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/vl.c b/vl.c
index 63d954bbcf..b246e47a58 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);
}