소스 검색

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

omar 11 년 전
부모
커밋
9b5493d1d9
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      imgui.cpp

+ 1 - 0
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)