mirror of
https://github.com/glfw/glfw.git
synced 2026-08-28 17:25:55 +02: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:
@@ -157,6 +157,8 @@ static void test_modes(void)
|
||||
if (!window_handle)
|
||||
{
|
||||
printf("User terminated program\n");
|
||||
|
||||
glfwTerminate();
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
}
|
||||
@@ -224,6 +226,7 @@ int main(int argc, char** argv)
|
||||
else if (mode == TEST_MODE)
|
||||
test_modes();
|
||||
|
||||
glfwTerminate();
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user