From 7b8a5235d4d650ebba4eda7fa82ca84bbf47a6c5 Mon Sep 17 00:00:00 2001 From: sumibi-yakitori Date: Thu, 1 Jun 2023 16:46:24 +0900 Subject: [PATCH] Fix a bug in error checking conditions. This avoids unintentional `Legacy` of the created OpenGL context --- gdk/macos/gdkmacosglcontext.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gdk/macos/gdkmacosglcontext.c b/gdk/macos/gdkmacosglcontext.c index ce78b09965..dc53e24079 100644 --- a/gdk/macos/gdkmacosglcontext.c +++ b/gdk/macos/gdkmacosglcontext.c @@ -344,14 +344,14 @@ create_pixel_format (GdkGLVersion *version, if (gdk_gl_version_get_major (version) >= 4) { attrs[1] = (CGLPixelFormatAttribute)kCGLOGLPVersion_GL4_Core; - if (CGLChoosePixelFormat (attrs, &format, &n_format)) + if (CHECK (error, CGLChoosePixelFormat (attrs, &format, &n_format))) return g_steal_pointer (&format); } if (gdk_gl_version_greater_equal (version, &GDK_GL_MIN_GL_VERSION)) { attrs[1] = (CGLPixelFormatAttribute)kCGLOGLPVersion_GL3_Core; - if (CGLChoosePixelFormat (attrs, &format, &n_format)) + if (CHECK (error, CGLChoosePixelFormat (attrs, &format, &n_format))) return g_steal_pointer (&format); } -- 2.30.2