diff --git a/Subsurface/Source/GUI/GUIComponent.cs b/Subsurface/Source/GUI/GUIComponent.cs index dc8e9d7cc..73a4142c7 100644 --- a/Subsurface/Source/GUI/GUIComponent.cs +++ b/Subsurface/Source/GUI/GUIComponent.cs @@ -33,6 +33,12 @@ namespace Barotrauma public static void ClearUpdateList() { + if (KeyboardDispatcher.Subscriber is GUIComponent && + !ComponentsToUpdate.Contains((GUIComponent)KeyboardDispatcher.Subscriber)) + { + KeyboardDispatcher.Subscriber = null; + } + ComponentsToUpdate.Clear(); }