From 0472500408093565e96be1181c4bea95f6f5494b Mon Sep 17 00:00:00 2001 From: LunaTheFoxgirl Date: Tue, 25 Apr 2023 13:40:02 +0200 Subject: [PATCH] Avoid crash if dialog is rendered on first frame. --- source/creator/core/package.d | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/source/creator/core/package.d b/source/creator/core/package.d index f50ace748..88735c9c7 100644 --- a/source/creator/core/package.d +++ b/source/creator/core/package.d @@ -97,6 +97,7 @@ private { ImGuiIO* io; bool done = false; ImGuiID viewportDock; + bool firstFrame = true; version (InBranding) { Texture incLogoI2D; @@ -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(); }