diff options
author | aliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162> | 2009-01-21 18:58:51 +0000 |
---|---|---|
committer | aliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162> | 2009-01-21 18:58:51 +0000 |
commit | 7da03b1d2622a66b033544e16d82d16d8a49568c (patch) | |
tree | 2afba52273311c4791f59b1f87e4f4313e6a5a00 /vl.c | |
parent | 7cff316ed97f62288d2667f53d365813e6b8b3f8 (diff) |
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>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6387 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'vl.c')
-rw-r--r-- | vl.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -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); } |