mirror of
https://github.com/glfw/glfw.git
synced 2026-11-18 21:04:54 +00: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:
@@ -106,7 +106,10 @@ static void list_extensions(int api, int major, int minor)
|
||||
{
|
||||
PFNGLGETSTRINGIPROC glGetStringi = (PFNGLGETSTRINGIPROC) glfwGetProcAddress("glGetStringi");
|
||||
if (!glGetStringi)
|
||||
{
|
||||
glfwTerminate();
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
glGetIntegerv(GL_NUM_EXTENSIONS, &count);
|
||||
|
||||
@@ -267,7 +270,10 @@ int main(int argc, char** argv)
|
||||
|
||||
window = glfwCreateWindow(0, 0, GLFW_WINDOWED, "Version", NULL);
|
||||
if (!window)
|
||||
{
|
||||
glfwTerminate();
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
glfwMakeContextCurrent(window);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user