[OpenGL] Fix double-free with ImGui context
@@ -110,8 +110,11 @@ void imgui_shutdown()
{
std::cerr << __func__ << std::endl;
+ if (state.imgui_ctx) {
ImGui_ImplOpenGL3_Shutdown();
ImGui::DestroyContext(state.imgui_ctx);
+ state.imgui_ctx = nullptr;
+ }
inited = false;
}
