mirror of
https://github.com/ocornut/imgui.git
synced 2026-01-09 23:54:20 +00:00
Misc: added assert to detect ~ImGuiContext() called without DestroyContext(). (#9051)
This commit is contained in:
parent
051a31594f
commit
1897248bda
2 changed files with 6 additions and 0 deletions
|
|
@ -4277,6 +4277,11 @@ ImGuiContext::ImGuiContext(ImFontAtlas* shared_font_atlas)
|
||||||
memset(TempKeychordName, 0, sizeof(TempKeychordName));
|
memset(TempKeychordName, 0, sizeof(TempKeychordName));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ImGuiContext::~ImGuiContext()
|
||||||
|
{
|
||||||
|
IM_ASSERT(Initialized == false && "Forgot to call DestroyContext()?");
|
||||||
|
}
|
||||||
|
|
||||||
void ImGui::Initialize()
|
void ImGui::Initialize()
|
||||||
{
|
{
|
||||||
ImGuiContext& g = *GImGui;
|
ImGuiContext& g = *GImGui;
|
||||||
|
|
|
||||||
|
|
@ -2546,6 +2546,7 @@ struct ImGuiContext
|
||||||
char TempKeychordName[64];
|
char TempKeychordName[64];
|
||||||
|
|
||||||
ImGuiContext(ImFontAtlas* shared_font_atlas);
|
ImGuiContext(ImFontAtlas* shared_font_atlas);
|
||||||
|
~ImGuiContext();
|
||||||
};
|
};
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue