mirror of
https://github.com/ocornut/imgui.git
synced 2026-01-14 00:34:18 +00:00
This commit is contained in:
parent
b168c72dd1
commit
4982cd136e
1 changed files with 6 additions and 3 deletions
|
|
@ -2040,6 +2040,12 @@ void ImGui::NewFrame()
|
|||
void ImGui::Shutdown()
|
||||
{
|
||||
ImGuiState& g = *GImGui;
|
||||
|
||||
// The fonts atlas can be used prior to calling NewFrame(), so we clear it even if g.Initialized is FALSE (which would happen if we never called NewFrame)
|
||||
if (g.IO.Fonts) // Testing for NULL to allow user to NULLify in case of running Shutdown() on multiple contexts. Bit hacky.
|
||||
g.IO.Fonts->Clear();
|
||||
|
||||
// Cleanup of other data are conditional on actually having used ImGui.
|
||||
if (!g.Initialized)
|
||||
return;
|
||||
|
||||
|
|
@ -2088,9 +2094,6 @@ void ImGui::Shutdown()
|
|||
ImGui::MemFree(g.LogClipboard);
|
||||
}
|
||||
|
||||
if (g.IO.Fonts) // Testing for NULL to allow user to NULLify in case of running Shutdown() on multiple contexts. Bit hacky.
|
||||
g.IO.Fonts->Clear();
|
||||
|
||||
g.Initialized = false;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue