From 8d7ae903a4644780235c2fdc5d7124cb3d4e4b50 Mon Sep 17 00:00:00 2001 From: goat Date: Mon, 10 Apr 2023 20:28:06 +0200 Subject: [PATCH] actually delete profiles in release build --- Dalamud/Plugin/Internal/Profiles/ProfileManager.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Dalamud/Plugin/Internal/Profiles/ProfileManager.cs b/Dalamud/Plugin/Internal/Profiles/ProfileManager.cs index 71835a9d6..62ade19b2 100644 --- a/Dalamud/Plugin/Internal/Profiles/ProfileManager.cs +++ b/Dalamud/Plugin/Internal/Profiles/ProfileManager.cs @@ -246,8 +246,11 @@ internal class ProfileManager : IServiceType profile.Remove(plugin.InternalName, false); } - Debug.Assert(this.config.SavedProfiles!.Remove(profile.Model), "this.config.SavedProfiles!.Remove(profile.Model)"); - Debug.Assert(this.profiles.Remove(profile), "this.profiles.Remove(profile)"); + if (!this.config.SavedProfiles!.Remove(profile.Model)) + 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(); }