From 43a8fccadac38117d38ecbe91f30220107d167dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1rio=20Freitas?= Date: Thu, 1 Sep 2016 00:23:22 +0100 Subject: [PATCH] fixed crash during maximize/restore on cocoa A crash will happen on cocoa systems if you do the following code: glfwSetWindowAspectRatio(w, GLFW_DONT_CARE, GLFW_DONT_CARE); glfwMaximizeWindow(w); --- src/cocoa_window.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cocoa_window.m b/src/cocoa_window.m index 5230786f5..3a593dcf8 100644 --- a/src/cocoa_window.m +++ b/src/cocoa_window.m @@ -1155,7 +1155,7 @@ void _glfwPlatformSetWindowSizeLimits(_GLFWwindow* window, void _glfwPlatformSetWindowAspectRatio(_GLFWwindow* window, int numer, int denom) { if (numer == GLFW_DONT_CARE || denom == GLFW_DONT_CARE) - [window->ns.object setContentAspectRatio:NSMakeSize(0, 0)]; + [window->ns.object setResizeIncrements:NSMakeSize(1.0, 1.0)]; else [window->ns.object setContentAspectRatio:NSMakeSize(numer, denom)]; }