@ -77,19 +77,17 @@ int main(void)
exit(EXIT_FAILURE);
}
if (thrd_create(&thread, thread_start, window) == thrd_success)
if (thrd_create(&thread, thread_start, window) != thrd_success)
{
fprintf(stderr, "Failed to create secondary thread\n");
while (!glfwGetWindowParam(window, GLFW_CLOSE_REQUESTED))
glfwWaitEvents();
running = GL_FALSE;
thrd_join(thread, &result);
else
exit(EXIT_SUCCESS);