Skip to content

Commit

Permalink
Proper cleanup before exit when GLAD fails to initialize.
Browse files Browse the repository at this point in the history
  • Loading branch information
bluescan committed Sep 9, 2024
1 parent f8c40ba commit b58407b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Src/TacentView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4438,7 +4438,8 @@ int main(int argc, char** argv)
if (!gladLoadGLLoader((GLADloadproc)glfwGetProcAddress))
{
tPrintf("Failed to initialize GLAD\n");
// @todo Do proper shutdown before return.
glfwDestroyWindow(Viewer::Window);
glfwTerminate();
return Viewer::ErrorCode_GUI_FailGLADInit;
}
tPrintf("GLAD V %s\n", glGetString(GL_VERSION));
Expand Down

0 comments on commit b58407b

Please sign in to comment.