mirror of
https://github.com/ocornut/imgui.git
synced 2026-03-27 19:02:04 +00:00
Error Handling: added better error report and recovery when calling EndFrame() or Render() without NewFrame().
This commit is contained in:
@@ -5641,7 +5641,11 @@ void ImGui::EndFrame()
|
||||
// Don't process EndFrame() multiple times.
|
||||
if (g.FrameCountEnded == g.FrameCount)
|
||||
return;
|
||||
IM_ASSERT(g.WithinFrameScope && "Forgot to call ImGui::NewFrame()?");
|
||||
if (!g.WithinFrameScope)
|
||||
{
|
||||
IM_ASSERT_USER_ERROR(g.WithinFrameScope, "Forgot to call ImGui::NewFrame()?");
|
||||
return;
|
||||
}
|
||||
|
||||
CallContextHooks(&g, ImGuiContextHookType_EndFramePre);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user