From b5d385824db2f204527713d6d6ad02c24a9ccef8 Mon Sep 17 00:00:00 2001 From: omar Date: Thu, 14 Jun 2018 15:02:43 +0200 Subject: [PATCH] Added assert in TreePop() to ease catching ID stack underflow earlier. --- imgui.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/imgui.cpp b/imgui.cpp index e779356f2..beefcfcd7 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -13323,6 +13323,7 @@ void ImGui::TreePop() } window->DC.TreeDepthMayJumpToParentOnPop &= (1 << window->DC.TreeDepth) - 1; + IM_ASSERT(window->IDStack.Size > 1); // There should always be 1 element in the IDStack (pushed during window creation). If this triggers you called TreePop/PopID too much. PopID(); }