[gtk/wip/otte/macos-werror: 11/16] glcontext: Avoid gcc warning on non-egl build




commit 1333686ee55ca5e8de7556369520007e82ee6093
Author: Benjamin Otte <otte redhat com>
Date:   Wed Nov 3 23:40:33 2021 +0100

    glcontext: Avoid gcc warning on non-egl build

 gdk/gdkglcontext.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/gdk/gdkglcontext.c b/gdk/gdkglcontext.c
index 23c5eba8bf..ff078ed765 100644
--- a/gdk/gdkglcontext.c
+++ b/gdk/gdkglcontext.c
@@ -490,8 +490,8 @@ gdk_gl_context_real_is_shared (GdkGLContext *self,
 static gboolean
 gdk_gl_context_real_clear_current (GdkGLContext *context)
 {
-  GdkDisplay *display = gdk_gl_context_get_display (context);
 #ifdef HAVE_EGL
+  GdkDisplay *display = gdk_gl_context_get_display (context);
   GdkGLContextPrivate *priv = gdk_gl_context_get_instance_private (context);
 
   if (priv->egl_context == NULL)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]