glcontext: Avoid gcc warning on non-egl build
authorBenjamin Otte <otte@redhat.com>
Wed, 3 Nov 2021 22:40:33 +0000 (23:40 +0100)
committerMatthias Clasen <mclasen@redhat.com>
Sat, 7 Jan 2023 00:46:58 +0000 (19:46 -0500)
gdk/gdkglcontext.c

index 040b9cce1aa38306dcf793e89c5025ad53484534..599b946de9f27d13839ac568373c6b7172e6c680 100644 (file)
@@ -504,8 +504,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)