qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [6387] Adds null check for DisplayStatus (Stefano Stabellini)
@ 2009-01-21 18:58 Anthony Liguori
  0 siblings, 0 replies; only message in thread
From: Anthony Liguori @ 2009-01-21 18:58 UTC (permalink / raw)
  To: qemu-devel

Revision: 6387
          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=6387
Author:   aliguori
Date:     2009-01-21 18:58:51 +0000 (Wed, 21 Jan 2009)

Log Message:
-----------
Adds null check for DisplayStatus (Stefano Stabellini)

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

Modified Paths:
--------------
    trunk/vl.c

Modified: trunk/vl.c
===================================================================
--- trunk/vl.c	2009-01-21 18:31:42 UTC (rev 6386)
+++ trunk/vl.c	2009-01-21 18:58:51 UTC (rev 6387)
@@ -2778,6 +2778,11 @@
 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);
 }
 

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-01-21 18:58 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-21 18:58 [Qemu-devel] [6387] Adds null check for DisplayStatus (Stefano Stabellini) Anthony Liguori

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).