From 67775448556d8dba304657719829f1ab768b3c97 Mon Sep 17 00:00:00 2001 From: omar Date: Thu, 3 Jan 2019 21:42:36 +0100 Subject: [PATCH] Added sanity check to debug parent/child ordering issues (they would generally manifest with an assert/crash in EndFrame bu tthis assert will catch some earlier). --- imgui.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/imgui.cpp b/imgui.cpp index ec4788a1..12f1ac25 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -4910,6 +4910,7 @@ bool ImGui::Begin(const char* name, bool* p_open, ImGuiWindowFlags flags) // Position child window if (flags & ImGuiWindowFlags_ChildWindow) { + IM_ASSERT(parent_window->Active); window->BeginOrderWithinParent = (short)parent_window->DC.ChildWindows.Size; parent_window->DC.ChildWindows.push_back(window); if (!(flags & ImGuiWindowFlags_Popup) && !window_pos_set_by_api && !window_is_child_tooltip)