[OpenGL] Fix double-free with ImGui context

pull/58/head
jackun 4 years ago
parent f99129f9de
commit ad598f7ec4
No known key found for this signature in database
GPG Key ID: 119DB3F1D05A9ED3

@ -110,8 +110,11 @@ void imgui_shutdown()
{
std::cerr << __func__ << std::endl;
ImGui_ImplOpenGL3_Shutdown();
ImGui::DestroyContext(state.imgui_ctx);
if (state.imgui_ctx) {
ImGui_ImplOpenGL3_Shutdown();
ImGui::DestroyContext(state.imgui_ctx);
state.imgui_ctx = nullptr;
}
inited = false;
}

Loading…
Cancel
Save