Added assert to catch users using Begin/End without a first NewFrame

This commit is contained in:
omar 2014-11-14 11:17:59 +09:00
parent 8a65d97bf0
commit 9b5493d1d9

View File

@ -2038,6 +2038,7 @@ bool ImGui::Begin(const char* name, bool* open, ImVec2 size, float fill_alpha, I
{ {
ImGuiState& g = GImGui; ImGuiState& g = GImGui;
const ImGuiStyle& style = g.Style; const ImGuiStyle& style = g.Style;
IM_ASSERT(g.Initialized); // Forgot to call ImGui::NewFrame()
ImGuiWindow* window = FindWindow(name); ImGuiWindow* window = FindWindow(name);
if (!window) if (!window)