qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] sdl2: skip init without outputs
@ 2016-06-01 14:08 Gerd Hoffmann
  2016-06-02 20:47 ` Cole Robinson
  0 siblings, 1 reply; 2+ messages in thread
From: Gerd Hoffmann @ 2016-06-01 14:08 UTC (permalink / raw)
  To: qemu-devel; +Cc: Gerd Hoffmann

Signed-off-by: Gerd Hoffmann <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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Qemu-devel] [PATCH] sdl2: skip init without outputs
  2016-06-01 14:08 [Qemu-devel] [PATCH] sdl2: skip init without outputs Gerd Hoffmann
@ 2016-06-02 20:47 ` Cole Robinson
  0 siblings, 0 replies; 2+ messages in thread
From: Cole Robinson @ 2016-06-02 20:47 UTC (permalink / raw)
  To: Gerd Hoffmann, qemu-devel

On 06/01/2016 10:08 AM, Gerd Hoffmann wrote:
> Signed-off-by: Gerd Hoffmann <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);
> 

Tested-by: Cole Robinson <crobinso@redhat.com>

Thanks,
Cole

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-06-02 20:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-01 14:08 [Qemu-devel] [PATCH] sdl2: skip init without outputs Gerd Hoffmann
2016-06-02 20:47 ` Cole Robinson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).