diff --git a/Bloxstrap/FastFlagManager.cs b/Bloxstrap/FastFlagManager.cs index 689299e..a69b3e5 100644 --- a/Bloxstrap/FastFlagManager.cs +++ b/Bloxstrap/FastFlagManager.cs @@ -207,7 +207,17 @@ namespace Bloxstrap } } - public string? GetPreset(string name) => GetValue(PresetFlags[name]); + public string? GetPreset(string name) + { + if (!PresetFlags.ContainsKey(name)) + { + App.Logger.WriteLine("FastFlagManager::GetPreset", $"Could not find preset {name}"); + Debug.Assert(false, $"Could not find preset {name}"); + return null; + } + + return GetValue(PresetFlags[name]); + } public T GetPresetEnum(IReadOnlyDictionary mapping, string prefix, string value) where T : Enum {