Misc: added assert to detect ~ImGuiContext() called without DestroyContext(). (#9051)
This commit is contained in:
@@ -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();
|
||||||
};
|
};
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|||||||
Reference in New Issue
Block a user