From d4a042b88d24464c5d86a01bc9c5ebf6f8ace353 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Wed, 5 May 2021 10:29:40 +0200 Subject: [PATCH] native: Fix compiler warning cogl_context is only used when building with EGLDevice support, resulting in an "unused variable" warning otherwise. Part-of: --- src/backends/native/meta-onscreen-native.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backends/native/meta-onscreen-native.c b/src/backends/native/meta-onscreen-native.c index eb49bd45c..99c9d7610 100644 --- a/src/backends/native/meta-onscreen-native.c +++ b/src/backends/native/meta-onscreen-native.c @@ -2045,7 +2045,6 @@ meta_onscreen_native_dispose (GObject *object) { CoglFramebuffer *framebuffer = COGL_FRAMEBUFFER (object); CoglOnscreen *onscreen = COGL_ONSCREEN (framebuffer); - CoglContext *cogl_context = cogl_framebuffer_get_context (framebuffer); MetaOnscreenNative *onscreen_native = META_ONSCREEN_NATIVE (onscreen); MetaRendererNative *renderer_native = onscreen_native->renderer_native; MetaRendererNativeGpuData *renderer_gpu_data; @@ -2072,6 +2071,7 @@ meta_onscreen_native_dispose (GObject *object) if (onscreen_native->egl.stream != EGL_NO_STREAM_KHR) { MetaEgl *egl = meta_onscreen_native_get_egl (onscreen_native); + CoglContext *cogl_context = cogl_framebuffer_get_context (framebuffer); CoglRenderer *cogl_renderer = cogl_context->display->renderer; CoglRendererEGL *cogl_renderer_egl = cogl_renderer->winsys;