aboutsummaryrefslogtreecommitdiff
path: root/hw/nseries.c
diff options
context:
space:
mode:
authoraurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162>2009-02-09 17:00:41 +0000
committeraurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162>2009-02-09 17:00:41 +0000
commit0921895137fc8c43f08cf1b2ddb6d6ae14438f12 (patch)
treecbfc8e186f789720754f34e15899ed07caab3028 /hw/nseries.c
parentbd5ea513986dfe68d1828ddd9df20078e743638f (diff)
Fix displaystate (r6344) regression in blizzard
Testcase: qemu-system-arm -M n810 -kernel /dev/null -m 130 Without this patch, we get a segfault. Signed-off-by: Riku Voipio <riku.voipio@iki.fi> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6577 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/nseries.c')
-rw-r--r--hw/nseries.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/nseries.c b/hw/nseries.c
index b4f295125f..32aaead27d 100644
--- a/hw/nseries.c
+++ b/hw/nseries.c
@@ -1273,7 +1273,7 @@ static void n8x0_init(ram_addr_t ram_size, const char *boot_device,
struct n800_s *s = (struct n800_s *) qemu_mallocz(sizeof(*s));
int sdram_size = binfo->ram_size;
int onenandram_size = 0x00010000;
- DisplayState *ds = get_displaystate();
+ DisplayState *ds;
if (ram_size < sdram_size + onenandram_size + OMAP242X_SRAM_SIZE) {
fprintf(stderr, "This architecture uses %i bytes of memory\n",
@@ -1361,6 +1361,7 @@ static void n8x0_init(ram_addr_t ram_size, const char *boot_device,
/* FIXME: We shouldn't really be doing this here. The LCD controller
will set the size once configured, so this just sets an initial
size until the guest activates the display. */
+ ds = get_displaystate();
ds->surface = qemu_resize_displaysurface(ds->surface, 800, 480, 32, 4 * 800);
dpy_resize(ds);
}