Move DrawContents and closing ImGui::End inside else tied to ImGui::Begin to prevent crash. (#643)

This commit is contained in:
Malkierian
2024-07-08 19:05:22 -04:00
committed by GitHub
parent 4ad405c7ea
commit a5203ea0ea
+3 -2
View File
@@ -66,9 +66,10 @@ void GuiWindow::Draw() {
}
if (!ImGui::Begin(mName.c_str(), &mIsVisible, mWindowFlags)) {
ImGui::End();
} else {
DrawElement();
ImGui::End();
}
DrawElement();
ImGui::End();
// Sync up the IsVisible flag if it was changed by ImGui
SyncVisibilityConsoleVariable();
}