diff --git a/Content.Server/Preferences/Managers/ServerPreferencesManager.cs b/Content.Server/Preferences/Managers/ServerPreferencesManager.cs index bef1ba1beb..e0de585826 100644 --- a/Content.Server/Preferences/Managers/ServerPreferencesManager.cs +++ b/Content.Server/Preferences/Managers/ServerPreferencesManager.cs @@ -300,13 +300,19 @@ namespace Content.Server.Preferences.Managers return; } - if (slot < 0 || slot >= MaxCharacterSlots) + + if (slot < 0) { return; } var curPrefs = prefsData.Prefs!; + if (!curPrefs.Characters.ContainsKey(slot)) + { + return; + } + // If they try to delete the slot they have selected then we switch to another one. // Of course, that's only if they HAVE another slot. int? nextSlot = null;