mirror of
https://github.com/ocornut/imgui.git
synced 2026-01-11 00:04:24 +00:00
Settings: Fixed saving an empty .ini file if CreateContext/DestroyContext are called without a single call to NewFrame(). (#1741)
This commit is contained in:
parent
296f03374b
commit
84fe711bdf
2 changed files with 6 additions and 2 deletions
|
|
@ -3676,7 +3676,9 @@ void ImGui::Shutdown(ImGuiContext* context)
|
|||
if (!g.Initialized)
|
||||
return;
|
||||
|
||||
SaveIniSettingsToDisk(g.IO.IniFilename);
|
||||
// Save settings (unless we haven't attempted to load them: CreateContext/DestroyContext without a call to NewFrame shouldn't save an empty file)
|
||||
if (g.SettingsLoaded)
|
||||
SaveIniSettingsToDisk(g.IO.IniFilename);
|
||||
|
||||
// Clear everything else
|
||||
for (int i = 0; i < g.Windows.Size; i++)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue