Clipper: Assert on extraneous calls to Step(). (#4822) + Demo tweak.

This commit is contained in:
ocornut
2022-02-18 18:39:29 +01:00
parent 29d462ebce
commit dca527be1b
3 changed files with 16 additions and 11 deletions

View File

@ -2599,6 +2599,7 @@ bool ImGuiListClipper::Step()
ImGuiContext& g = *GImGui;
ImGuiWindow* window = g.CurrentWindow;
ImGuiListClipperData* data = (ImGuiListClipperData*)TempData;
IM_ASSERT(data != NULL && "Called ImGuiListClipper::Step() too many times, or before ImGuiListClipper::Begin() ?");
ImGuiTable* table = g.CurrentTable;
if (table && table->IsInsideRow)