Merge pull request #788 from KazWolfe/master

Fix WindowSystem loop issues
This commit is contained in:
goaaats 2022-04-13 04:53:13 +02:00 committed by GitHub
commit f317bc48a0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -106,7 +106,8 @@ namespace Dalamud.Interface.Windowing
if (hasNamespace)
ImGui.PushID(this.Namespace);
foreach (var window in this.windows)
// Shallow clone the list of windows so that we can edit it without modifying it while the loop is iterating
foreach (var window in this.windows.ToArray())
{
#if DEBUG
// Log.Verbose($"[WS{(hasNamespace ? "/" + this.Namespace : string.Empty)}] Drawing {window.WindowName}");