From 5dc940ead2426fed6853351d14e3d9b99f4e999b Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Thu, 6 Jan 2022 19:23:29 +0100 Subject: [PATCH] glcontext: Don't spew warnings on surfaceless contexts Get the display directly instead of via the nonexisting surface. --- gdk/gdkglcontext.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/gdk/gdkglcontext.c b/gdk/gdkglcontext.c index 9ab690f6fa..7acbeafe68 100644 --- a/gdk/gdkglcontext.c +++ b/gdk/gdkglcontext.c @@ -185,8 +185,7 @@ gdk_gl_context_dispose (GObject *gobject) if (priv->egl_context != NULL) { - GdkSurface *surface = gdk_gl_context_get_surface (context); - GdkDisplay *display = gdk_surface_get_display (surface); + GdkDisplay *display = gdk_draw_context_get_display (GDK_DRAW_CONTEXT (context)); EGLDisplay *egl_display = gdk_display_get_egl_display (display); if (eglGetCurrentContext () == priv->egl_context)