Skip to content
Snippets Groups Projects
Commit 79e2433e authored by Camilla Löwy's avatar Camilla Löwy
Browse files

Fix termination on sync object creation failure

parent 546c99a3
No related branches found
No related tags found
No related merge requests found
...@@ -205,12 +205,13 @@ GLFWAPI int glfwInit(void) ...@@ -205,12 +205,13 @@ GLFWAPI int glfwInit(void)
return GLFW_FALSE; return GLFW_FALSE;
} }
if (!_glfwPlatformCreateMutex(&_glfw.errorLock)) if (!_glfwPlatformCreateMutex(&_glfw.errorLock) ||
return GLFW_FALSE; !_glfwPlatformCreateTls(&_glfw.errorSlot) ||
if (!_glfwPlatformCreateTls(&_glfw.errorSlot)) !_glfwPlatformCreateTls(&_glfw.contextSlot))
return GLFW_FALSE; {
if (!_glfwPlatformCreateTls(&_glfw.contextSlot)) terminate();
return GLFW_FALSE; return GLFW_FALSE;
}
_glfwPlatformSetTls(&_glfw.errorSlot, &_glfwMainThreadError); _glfwPlatformSetTls(&_glfw.errorSlot, &_glfwMainThreadError);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment