From: Tayrtahn Date: Tue, 9 Jan 2024 22:05:40 +0000 (-0500) Subject: Fix fatal error when closing vending machine wire UI (#23815) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=be118013a949389ca98b3ab8ba3307eb867706af;p=space-station-14.git Fix fatal error when closing vending machine wire UI (#23815) That's a whoops on my part --- diff --git a/Content.Server/VendingMachines/VendingMachineSystem.cs b/Content.Server/VendingMachines/VendingMachineSystem.cs index 9125bd8756..6d7ebef464 100644 --- a/Content.Server/VendingMachines/VendingMachineSystem.cs +++ b/Content.Server/VendingMachines/VendingMachineSystem.cs @@ -114,6 +114,9 @@ namespace Content.Server.VendingMachines private void OnBoundUIClosed(EntityUid uid, VendingMachineComponent component, BoundUIClosedEvent args) { + if (args.UiKey is not VendingMachineUiKey) + return; + if ((VendingMachineUiKey) args.UiKey != VendingMachineUiKey.Key) return;