Skip to content

Commit

Permalink
Avoid crash if dialog is rendered on first frame.
Browse files Browse the repository at this point in the history
  • Loading branch information
LunaTheFoxgirl committed Apr 25, 2023
1 parent 4b0b0c8 commit 0472500
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion source/creator/core/package.d
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ private {
ImGuiIO* io;
bool done = false;
ImGuiID viewportDock;
bool firstFrame = true;

version (InBranding) {
Texture incLogoI2D;
Expand Down Expand Up @@ -604,7 +605,9 @@ void incBeginLoopNoEv() {
incSettingsSet("firstrun_complete", true);
}

incRenderDialogs();
// HACK: ImGui Crashes if a popup is rendered on the first frame, let's avoid that.
if (firstFrame) firstFrame = false;
else incRenderDialogs();
incStatusUpdate();
}

Expand Down

0 comments on commit 0472500

Please sign in to comment.