From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38189) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WuJpK-0008CN-LX for qemu-devel@nongnu.org; Tue, 10 Jun 2014 07:02:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WuJpB-0004TN-KM for qemu-devel@nongnu.org; Tue, 10 Jun 2014 07:02:50 -0400 Received: from mx1.redhat.com ([209.132.183.28]:6309) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WuJpB-0004TA-C3 for qemu-devel@nongnu.org; Tue, 10 Jun 2014 07:02:41 -0400 From: Gerd Hoffmann Date: Tue, 10 Jun 2014 13:02:33 +0200 Message-Id: <1402398153-18272-3-git-send-email-kraxel@redhat.com> In-Reply-To: <1402398153-18272-1-git-send-email-kraxel@redhat.com> References: <1402398153-18272-1-git-send-email-kraxel@redhat.com> Subject: [Qemu-devel] [PULL 2/2] console: fix -vga none -sdl crash List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Gerd Hoffmann , Anthony Liguori Call get_alloc_displaystate() for proper initialization instead of allocating with g_new(). Signed-off-by: Gerd Hoffmann --- ui/console.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/ui/console.c b/ui/console.c index b5dac64..7dc4c14 100644 --- a/ui/console.c +++ b/ui/console.c @@ -1580,10 +1580,7 @@ DisplayState *init_displaystate(void) gchar *name; int i; - if (!display_state) { - display_state = g_new0(DisplayState, 1); - } - + get_alloc_displaystate(); for (i = 0; i < nb_consoles; i++) { if (consoles[i]->console_type != GRAPHIC_CONSOLE && consoles[i]->ds == NULL) { -- 1.8.3.1