ImDrawData: fixed late initialized field. (Amend 6f41d13)

Would effectively be initialized on use but best to clear on constructor.
This commit is contained in:
ocornut
2026-07-23 17:55:43 +02:00
parent f594633b54
commit f31f98f4cd
2 changed files with 2 additions and 2 deletions

View File

@@ -2280,7 +2280,7 @@ void ImDrawListSplitter::SetCurrentChannel(ImDrawList* draw_list, int idx)
void ImDrawData::Clear()
{
Valid = false;
TotalIdxCount = TotalVtxCount = 0;
FrameCount = TotalIdxCount = TotalVtxCount = 0;
CmdLists.resize(0); // The ImDrawList are NOT owned by ImDrawData but e.g. by ImGuiContext, so we don't clear them.
DisplayPos = DisplaySize = FramebufferScale = ImVec2(0.0f, 0.0f);
OwnerViewport = NULL;