From 6082176d05139ff13ecf691533a87ca9171942b9 Mon Sep 17 00:00:00 2001 From: WilliamWsyHK Date: Tue, 3 Sep 2024 23:49:56 +0800 Subject: [PATCH] Do not use foreach while updating original enumerable --- src/Ryujinx/UI/ViewModels/ModManagerViewModel.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Ryujinx/UI/ViewModels/ModManagerViewModel.cs b/src/Ryujinx/UI/ViewModels/ModManagerViewModel.cs index 8321bf8949..3d49512b9c 100644 --- a/src/Ryujinx/UI/ViewModels/ModManagerViewModel.cs +++ b/src/Ryujinx/UI/ViewModels/ModManagerViewModel.cs @@ -313,9 +313,9 @@ namespace Ryujinx.Ava.UI.ViewModels public void DeleteAll() { - foreach (var mod in Mods) + while (Mods.Count > 0) { - Delete(mod); + Delete(Mods[0]); } Mods.Clear();