From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=49593 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OESkG-0004FQ-3h for qemu-devel@nongnu.org; Tue, 18 May 2010 15:46:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OESjS-0005tZ-4W for qemu-devel@nongnu.org; Tue, 18 May 2010 15:45:39 -0400 Received: from mx1.redhat.com ([209.132.183.28]:1135) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OESjR-0005tQ-Qe for qemu-devel@nongnu.org; Tue, 18 May 2010 15:45:38 -0400 Received: from int-mx03.intmail.prod.int.phx2.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o4IJjaf1018288 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 18 May 2010 15:45:36 -0400 From: Gerd Hoffmann Date: Tue, 18 May 2010 21:45:33 +0200 Message-Id: <1274211933-20173-1-git-send-email-kraxel@redhat.com> Subject: [Qemu-devel] [PATCH] check for active_console before using it List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Gerd Hoffmann Other vga_hw_* functions do the same. Fixes a segmentation fault. Trigger: boot with -nodefaults, then connect via vnc. Signed-off-by: Gerd Hoffmann --- console.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/console.c b/console.c index 7070b1b..4c42b28 100644 --- a/console.c +++ b/console.c @@ -167,7 +167,7 @@ void vga_hw_update(void) void vga_hw_invalidate(void) { - if (active_console->hw_invalidate) + if (active_console && active_console->hw_invalidate) active_console->hw_invalidate(active_console->hw); } -- 1.6.6.1