[Spice-devel] [PATCH spice-gtk 1/5] egl: add a precondition on gl_make_current()

marcandre.lureau at redhat.com marcandre.lureau at redhat.com
Wed Jun 7 20:55:37 UTC 2017


From: Marc-André Lureau <marcandre.lureau at redhat.com>

To ease with debugging GL issues.

Signed-off-by: Marc-André Lureau <marcandre.lureau at redhat.com>
---
 src/spice-widget-egl.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/spice-widget-egl.c b/src/spice-widget-egl.c
index 130710e..f9c024c 100644
--- a/src/spice-widget-egl.c
+++ b/src/spice-widget-egl.c
@@ -289,6 +289,8 @@ gl_make_current(SpiceDisplay *display, GError **err)
 {
     SpiceDisplayPrivate *d = SPICE_DISPLAY_GET_PRIVATE(display);
 
+    g_return_val_if_fail(d->egl.context_ready, FALSE);
+
     if (GDK_IS_X11_DISPLAY(gdk_display_get_default())) {
         EGLBoolean success = eglMakeCurrent(d->egl.display,
                                             d->egl.surface,
-- 
2.13.0.91.g00982b8dd



More information about the Spice-devel mailing list