From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50595) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b8j9v-0003pU-Il for qemu-devel@nongnu.org; Fri, 03 Jun 2016 03:04:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b8j9o-0006Oa-EV for qemu-devel@nongnu.org; Fri, 03 Jun 2016 03:04:42 -0400 Received: from mx1.redhat.com ([209.132.183.28]:57154) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b8j9o-0006NN-9b for qemu-devel@nongnu.org; Fri, 03 Jun 2016 03:04:36 -0400 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) (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 E1E998113A for ; Fri, 3 Jun 2016 07:04:35 +0000 (UTC) From: Gerd Hoffmann Date: Fri, 3 Jun 2016 09:04:27 +0200 Message-Id: <1464937468-14816-7-git-send-email-kraxel@redhat.com> In-Reply-To: <1464937468-14816-1-git-send-email-kraxel@redhat.com> References: <1464937468-14816-1-git-send-email-kraxel@redhat.com> Subject: [Qemu-devel] [PULL 6/7] 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 Tested-by: Cole Robinson Message-id: 1464790116-32405-1-git-send-email-kraxel@redhat.com --- 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