diff --git a/ScpsInfoDisplay/EventHandlers.cs b/ScpsInfoDisplay/EventHandlers.cs index e98bda4..1558b31 100644 --- a/ScpsInfoDisplay/EventHandlers.cs +++ b/ScpsInfoDisplay/EventHandlers.cs @@ -42,11 +42,11 @@ public void OnWaitingForPlayers() public void OnRoundRestart() { - foreach (KeyValuePair kvp in _allDisplays) + foreach (KeyValuePair display in _allDisplays.ToList()) { - if (kvp.Value.IsRunning) - Timing.KillCoroutines(kvp.Value); - _allDisplays.Remove(kvp.Key); + if (display.Key != null && display.Value.IsRunning) + Timing.KillCoroutines(display.Value); + _allDisplays.Remove(display.Key); } _allDisplays.Clear(); } diff --git a/ScpsInfoDisplay/ScpsInfoDisplay.cs b/ScpsInfoDisplay/ScpsInfoDisplay.cs index de06c83..800aac2 100644 --- a/ScpsInfoDisplay/ScpsInfoDisplay.cs +++ b/ScpsInfoDisplay/ScpsInfoDisplay.cs @@ -10,7 +10,7 @@ internal class ScpsInfoDisplay : Plugin public override string Prefix => "scpsinfodisplay"; public override string Name => "ScpsInfoDisplay"; public override string Author => "bladuk."; - public override Version Version { get; } = new Version(1, 1, 1); + public override Version Version { get; } = new Version(1, 1, 2); public override Version RequiredExiledVersion { get; } = new Version(5, 2, 1); public static ScpsInfoDisplay Singleton = new ScpsInfoDisplay(); private EventHandlers _eventHandlers;