Browse Source

Context: NewFrame() asserts (#1565)

omar 7 years ago
parent
commit
2026e792cd
1 changed files with 1 additions and 0 deletions
  1. 1 0
      imgui.cpp

+ 1 - 0
imgui.cpp

@@ -2300,6 +2300,7 @@ ImDrawListSharedData* ImGui::GetDrawListSharedData()
 
 void ImGui::NewFrame()
 {
+    IM_ASSERT(GImGui != NULL && "No current context. Did you call ImGui::CreateContext() or ImGui::SetCurrentContext()?");
     ImGuiContext& g = *GImGui;
 
     // Check user data