Add assertions for context function invariants

Related to #2327

(cherry picked from commit 93d70cb6a8)
This commit is contained in:
Camilla Löwy
2023-12-03 17:07:25 +01:00
parent cb0dafa7c0
commit c98860db9e
4 changed files with 7 additions and 5 deletions
+4 -5
View File
@@ -81,11 +81,10 @@ static void swapIntervalNSGL(int interval)
@autoreleasepool {
_GLFWwindow* window = _glfwPlatformGetTls(&_glfw.contextSlot);
if (window)
{
[window->context.nsgl.object setValues:&interval
forParameter:NSOpenGLContextParameterSwapInterval];
}
assert(window != NULL);
[window->context.nsgl.object setValues:&interval
forParameter:NSOpenGLContextParameterSwapInterval];
} // autoreleasepool
}