From: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> Date: Wed, 29 May 2024 17:25:09 +0000 (+1000) Subject: Fix surveillance camera closing (#28374) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=a90cb25ef73d9f2358ee0d668928de2e7a31a47a;p=space-station-14.git Fix surveillance camera closing (#28374) The boilerplate sucks but I haven't thought of something good. --- diff --git a/Content.Client/SurveillanceCamera/UI/SurveillanceCameraSetupBoundUi.cs b/Content.Client/SurveillanceCamera/UI/SurveillanceCameraSetupBoundUi.cs index 1880e431ee..295724788e 100644 --- a/Content.Client/SurveillanceCamera/UI/SurveillanceCameraSetupBoundUi.cs +++ b/Content.Client/SurveillanceCamera/UI/SurveillanceCameraSetupBoundUi.cs @@ -31,7 +31,7 @@ public sealed class SurveillanceCameraSetupBoundUi : BoundUserInterface _window.OpenCentered(); _window.OnNameConfirm += SendDeviceName; _window.OnNetworkConfirm += SendSelectedNetwork; - + _window.OnClose += Close; } private void SendSelectedNetwork(int idx) @@ -63,7 +63,8 @@ public sealed class SurveillanceCameraSetupBoundUi : BoundUserInterface if (disposing) { - _window!.Dispose(); + _window?.Dispose(); + _window = null; } } }