diff --git a/imgui.cpp b/imgui.cpp index ffa9d146..00bb582a 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -2124,7 +2124,8 @@ void ImGui::Shutdown() ImGui::MemFree(g.LogClipboard); } - g.IO.Fonts->Clear(); + 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; }