Fix termination on sync object creation failure

master
Camilla Löwy ago%!(EXTRA string=8 years)
parent 546c99a3a3
commit 79e2433eb0
  1. 11
      src/init.c

@ -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);

Loading…
Cancel
Save