From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LPALI-0007ln-H5 for qemu-devel@nongnu.org; Tue, 20 Jan 2009 01:44:08 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LPALG-0007kH-Pd for qemu-devel@nongnu.org; Tue, 20 Jan 2009 01:44:07 -0500 Received: from [199.232.76.173] (port=59650 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LPALG-0007k8-JU for qemu-devel@nongnu.org; Tue, 20 Jan 2009 01:44:06 -0500 Received: from cdptpa-omtalb.mail.rr.com ([75.180.132.122]:59242) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LPALG-0000dS-94 for qemu-devel@nongnu.org; Tue, 20 Jan 2009 01:44:06 -0500 Received: from localhost.localdomain ([76.88.95.122]) by cdptpa-omta03.mail.rr.com with ESMTP id <20090120064404.PRII22141.cdptpa-omta03.mail.rr.com@localhost.localdomain> for ; Tue, 20 Jan 2009 06:44:04 +0000 Date: Mon, 19 Jan 2009 22:43:58 -0800 From: Andrew May Message-ID: <20090119224358.12d91af1@acmay.homeip.net> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] [PATCH] dumb_display_init() crash Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org This fixes a crash for the 405 boards that don't do a display init. I would think this is correct but I am not sure if there is more that needs to be setup. This at least gets me back to the SDL display I use to see before the re-org. diff --git a/trunk/vl.c b/trunk/vl.c index 63d954b..cc58df2 100644 --- a/trunk/vl.c +++ b/trunk/vl.c @@ -2778,6 +2778,12 @@ DisplayState *get_displaystate(void) static void dumb_display_init(void) { DisplayState *ds = qemu_mallocz(sizeof(DisplayState)); + + if (ds == NULL) + return; + + ds->surface = qemu_create_displaysurface(640, 480, 32, 640 * 4); + register_displaystate(ds); }