From 7556c44796a9d976866eaaed674e8d97d404cf4e Mon Sep 17 00:00:00 2001
From: Rusty Moyher <[EMAIL REDACTED]>
Date: Sat, 12 Oct 2024 16:01:21 -0500
Subject: [PATCH] SDL3: Fixed Cocoa_GL_CreateContext() not returning a context
on success (#11181)
---
src/video/cocoa/SDL_cocoaopengl.m | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/video/cocoa/SDL_cocoaopengl.m b/src/video/cocoa/SDL_cocoaopengl.m
index de1f661f2fd2b..29f1a66e07262 100644
--- a/src/video/cocoa/SDL_cocoaopengl.m
+++ b/src/video/cocoa/SDL_cocoaopengl.m
@@ -286,7 +286,7 @@ SDL_GLContext Cocoa_GL_CreateContext(SDL_VideoDevice *_this, SDL_Window *window)
_this->GL_SwapWindow = Cocoa_GLES_SwapWindow;
_this->GL_DestroyContext = Cocoa_GLES_DestroyContext;
- if (Cocoa_GLES_LoadLibrary(_this, NULL) != 0) {
+ if (!Cocoa_GLES_LoadLibrary(_this, NULL)) {
return NULL;
}
return Cocoa_GLES_CreateContext(_this, window);