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;