summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2021-01-29 17:08:30 +0400
committerMarc-André Lureau <marcandre.lureau@redhat.com>2021-01-29 17:08:30 +0400
commit2e4e3b7ba2fb6941fcfe06ce7dab8c09f6b6c632 (patch)
treea5f5b6067cc4b927cfc5e9c2a3708d74467271f8
parent63e46029095b3eeec5a47a00a5c9868b71381435 (diff)
egl: don't call gl_make_current if context isn't ready
This avoids a critical warning. The function will eventually be called again on realize. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
-rw-r--r--src/spice-widget-egl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/spice-widget-egl.c b/src/spice-widget-egl.c
index e31e322..b40bebf 100644
--- a/src/spice-widget-egl.c
+++ b/src/spice-widget-egl.c
@@ -431,7 +431,7 @@ void spice_egl_resize_display(SpiceDisplay *display, int w, int h)
SpiceDisplayPrivate *d = display->priv;
int prog;
- if (!gl_make_current(display, NULL))
+ if (!d->egl.context_ready || !gl_make_current(display, NULL))
return;
glGetIntegerv(GL_CURRENT_PROGRAM, &prog);