Fix a bug in error checking conditions. This avoids unintentional `Legacy` of the...
authorsumibi-yakitori <nekosoft360@gmail.com>
Thu, 1 Jun 2023 07:46:24 +0000 (16:46 +0900)
committersumibi-yakitori <nekosoft360@gmail.com>
Thu, 1 Jun 2023 07:46:24 +0000 (16:46 +0900)
gdk/macos/gdkmacosglcontext.c

index ce78b0996589dd37e3466e401d27f74e74f8ff1c..dc53e240791879f0c18b60d6e096d38d3910ff47 100644 (file)
@@ -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);
     }