mirror of
https://github.com/ocornut/imgui.git
synced 2026-01-11 00:04:24 +00:00
Error Handling: added better error report and recovery when calling EndFrame() or Render() without NewFrame().
This commit is contained in:
parent
b23a216ecd
commit
7ab4728a36
2 changed files with 7 additions and 1 deletions
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue