mirror of
https://github.com/glfw/glfw.git
synced 2026-01-11 15:23:17 +01:00
Removed registering glfwTerminate with atexit.
Functions registered with atexit are called from the thread calling exit. glfwTerminate should only be called from the main thread. Mistakes should be explicit.
This commit is contained in:
@@ -73,9 +73,9 @@ int main(void)
|
||||
window = glfwCreateWindow(0, 0, GLFW_WINDOWED, "", NULL);
|
||||
if (!window)
|
||||
{
|
||||
glfwTerminate();
|
||||
|
||||
fprintf(stderr, "Failed to open GLFW window: %s\n", glfwErrorString(glfwGetError()));
|
||||
|
||||
glfwTerminate();
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user