From 9b5493d1d9d8ae6858c67f47a095ea9d62ac95b2 Mon Sep 17 00:00:00 2001 From: omar Date: Fri, 14 Nov 2014 11:17:59 +0900 Subject: [PATCH] Added assert to catch users using Begin/End without a first NewFrame --- imgui.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/imgui.cpp b/imgui.cpp index 9935c7846..f5ce8d612 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -2038,6 +2038,7 @@ bool ImGui::Begin(const char* name, bool* open, ImVec2 size, float fill_alpha, I { ImGuiState& g = GImGui; const ImGuiStyle& style = g.Style; + IM_ASSERT(g.Initialized); // Forgot to call ImGui::NewFrame() ImGuiWindow* window = FindWindow(name); if (!window)