diff --git a/imgui.cpp b/imgui.cpp index 8eb17280d5b4..3a1aaba3fcd1 100644 --- a/imgui.cpp +++ b/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