mirror of
https://github.com/glfw/glfw.git
synced 2026-09-21 16:44:11 +00:00
Add assertions for context function invariants
Related to #2327
(cherry picked from commit 93d70cb6a8)
This commit is contained in:
+4
-5
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user