Skip to content

Commit b58407b

Browse files
committed
Proper cleanup before exit when GLAD fails to initialize.
1 parent f8c40ba commit b58407b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Src/TacentView.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4438,7 +4438,8 @@ int main(int argc, char** argv)
44384438
if (!gladLoadGLLoader((GLADloadproc)glfwGetProcAddress))
44394439
{
44404440
tPrintf("Failed to initialize GLAD\n");
4441-
// @todo Do proper shutdown before return.
4441+
glfwDestroyWindow(Viewer::Window);
4442+
glfwTerminate();
44424443
return Viewer::ErrorCode_GUI_FailGLADInit;
44434444
}
44444445
tPrintf("GLAD V %s\n", glGetString(GL_VERSION));

0 commit comments

Comments
 (0)