Parcourir la source

Context: NewFrame() asserts (#1565)

omar il y a 7 ans
Parent
commit
2026e792cd
1 fichiers modifiés avec 1 ajouts et 0 suppressions
  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