remove plugins from deleting profile synchronously

This commit is contained in:
goat 2023-04-10 20:25:46 +02:00
parent 2ed215b74b
commit 7fe004c875
No known key found for this signature in database
GPG key ID: 49E2AA8C6A76498B
2 changed files with 8 additions and 4 deletions

View file

@ -243,7 +243,9 @@ internal class ProfileManagerWidget
if (ImGuiComponents.IconButton(FontAwesomeIcon.Trash))
{
Task.Run(() => profman.DeleteProfile(profile))
// DeleteProfile() is sync, it doesn't apply and we are modifying the plugins collection. Will throw below when iterating
profman.DeleteProfile(profile);
Task.Run(() => profman.ApplyAllWantStates())
.ContinueWith(t =>
{
this.Reset();