actually delete profiles in release build

This commit is contained in:
goat 2023-04-10 20:28:06 +02:00
parent 7fe004c875
commit 8d7ae903a4
No known key found for this signature in database
GPG key ID: 49E2AA8C6A76498B

View file

@ -246,8 +246,11 @@ internal class ProfileManager : IServiceType
profile.Remove(plugin.InternalName, false); profile.Remove(plugin.InternalName, false);
} }
Debug.Assert(this.config.SavedProfiles!.Remove(profile.Model), "this.config.SavedProfiles!.Remove(profile.Model)"); if (!this.config.SavedProfiles!.Remove(profile.Model))
Debug.Assert(this.profiles.Remove(profile), "this.profiles.Remove(profile)"); throw new Exception("Couldn't remove profile from models");
if (!this.profiles.Remove(profile))
throw new Exception("Couldn't remove runtime profile");
this.config.QueueSave(); this.config.QueueSave();
} }