From 2e4e3b7ba2fb6941fcfe06ce7dab8c09f6b6c632 Mon Sep 17 00:00:00 2001 From: Marc-André Lureau Date: Fri, 29 Jan 2021 17:08:30 +0400 Subject: egl: don't call gl_make_current if context isn't ready MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This avoids a critical warning. The function will eventually be called again on realize. Signed-off-by: Marc-André Lureau --- src/spice-widget-egl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- cgit v1.2.3