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:
Camilla Berglund
2012-10-22 03:20:16 +02:00
parent 5df4df6ca4
commit d68acb78bf
13 changed files with 40 additions and 4 deletions

View File

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