浏览代码

Removed unnecessary assert (will crash well enough without) + comment

ocornut 10 年之前
父节点
当前提交
876a755bac
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      imgui.cpp

+ 1 - 1
imgui.cpp

@@ -1222,8 +1222,8 @@ public:
 
 static inline ImGuiWindow* GetCurrentWindow()
 {
+    // If this ever crash it probably means that ImGui::NewFrame() hasn't been called. We should always have a CurrentWindow in the stack (there is an implicit "Debug" window)
     ImGuiState& g = *GImGui;
-    IM_ASSERT(g.CurrentWindow != NULL);    // ImGui::NewFrame() hasn't been called yet?
     g.CurrentWindow->Accessed = true;
     return g.CurrentWindow;
 }