[6387] Adds null check for DisplayStatus (Stefano Stabellini)
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 <[email protected]>
Signed-off-by Stefano Stabellini <[email protected]>
Signed-off-by Anthony Liguori <[email protected]>
Modified Paths:
--------------
trunk/vl.c
Modified: trunk/vl.c
===================================================================
vl.c +5 -0
@@ -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); }