f8dc431
From: Cole Robinson <crobinso@redhat.com>
f8dc431
Date: Wed, 18 May 2016 11:44:33 -0400
f8dc431
Subject: [PATCH] ui: spice: Exit if gl=on EGL init fails
f8dc431
f8dc431
The user explicitly requested spice GL, so if we know it isn't
f8dc431
going to work we should exit
f8dc431
f8dc431
Signed-off-by: Cole Robinson <crobinso@redhat.com>
f8dc431
---
f8dc431
 ui/spice-core.c | 6 ++++--
f8dc431
 1 file changed, 4 insertions(+), 2 deletions(-)
f8dc431
f8dc431
diff --git a/ui/spice-core.c b/ui/spice-core.c
f8dc431
index 61db3c1..da05054 100644
f8dc431
--- a/ui/spice-core.c
f8dc431
+++ b/ui/spice-core.c
f8dc431
@@ -833,9 +833,11 @@ void qemu_spice_init(void)
f8dc431
                          "incompatible with -spice port/tls-port");
f8dc431
             exit(1);
f8dc431
         }
f8dc431
-        if (egl_rendernode_init() == 0) {
f8dc431
-            display_opengl = 1;
f8dc431
+        if (egl_rendernode_init() != 0) {
f8dc431
+            error_report("Failed to initialize EGL render node for SPICE GL");
f8dc431
+            exit(1);
f8dc431
         }
f8dc431
+        display_opengl = 1;
f8dc431
     }
f8dc431
 #endif
f8dc431
 }