From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39619) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b86pC-000087-5v for qemu-devel@nongnu.org; Wed, 01 Jun 2016 10:08:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b86p7-0005lw-UE for qemu-devel@nongnu.org; Wed, 01 Jun 2016 10:08:45 -0400 Received: from mx1.redhat.com ([209.132.183.28]:60333) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b86p7-0005le-P3 for qemu-devel@nongnu.org; Wed, 01 Jun 2016 10:08:41 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 5152985543 for ; Wed, 1 Jun 2016 14:08:40 +0000 (UTC) From: Gerd Hoffmann Date: Wed, 1 Jun 2016 16:08:36 +0200 Message-Id: <1464790116-32405-1-git-send-email-kraxel@redhat.com> Subject: [Qemu-devel] [PATCH] sdl2: skip init without outputs List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Gerd Hoffmann Signed-off-by: Gerd Hoffmann --- ui/sdl2.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ui/sdl2.c b/ui/sdl2.c index 909038f..30d2a3c 100644 --- a/ui/sdl2.c +++ b/ui/sdl2.c @@ -794,6 +794,9 @@ void sdl_display_init(DisplayState *ds, int full_screen, int no_frame) } } sdl2_num_outputs = i; + if (sdl2_num_outputs == 0) { + return; + } sdl2_console = g_new0(struct sdl2_console, sdl2_num_outputs); for (i = 0; i < sdl2_num_outputs; i++) { QemuConsole *con = qemu_console_lookup_by_index(i); -- 1.8.3.1