Skip to content

Commit

Permalink
ldjam56: Close the fake imgui render iteration on failure
Browse files Browse the repository at this point in the history
We keep a "window" between imgui_render_begin() and imgui_render()
during initialization, so that any early ImGui calls don't abort.
In case of partial initialization failure, we still need to close
this window before imgui_render_begin() gets called again from
render_frame() and trips an assert in ImGui. Fix this.

Signed-off-by: Alexander Shishkin <[email protected]>
  • Loading branch information
virtuoso committed Nov 4, 2024
1 parent 45b0cbc commit 408b54c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions demo/ldjam56/onehandclap.c
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,8 @@ int main(int argc, char **argv, char **envp)
clap_done(clap_ctx, 0);
#else
exit_ui:
if (err)
imgui_render();
#endif

return EXIT_SUCCESS;
Expand Down

0 comments on commit 408b54c

Please sign in to comment.