Commit 22f707f9 authored by Richard Gobeille's avatar Richard Gobeille
Browse files

engine: don't attempt to tear down ImGui in destroy_window_resources() if we...

engine: don't attempt to tear down ImGui in destroy_window_resources() if we didn't even make it far enough through initialization to get it set up
parent b041aee1
......@@ -1499,11 +1499,15 @@ static void destroy_window_resources()
#endif
#if SDL_MAJOR_VERSION >= 2
if (g_ImGui_IO)
{
#ifdef USE_OPENGL
ImGui_ImplOpenGL3_Shutdown();
ImGui_ImplOpenGL3_Shutdown();
#endif
ImGui_ImplSDL2_Shutdown();
ImGui::DestroyContext();
ImGui_ImplSDL2_Shutdown();
ImGui::DestroyContext();
g_ImGui_IO = NULL;
}
if (sdl_context)
SDL_GL_DeleteContext(sdl_context);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment