]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Fix surveillance camera closing (#28374)
authormetalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
Wed, 29 May 2024 17:25:09 +0000 (03:25 +1000)
committerGitHub <noreply@github.com>
Wed, 29 May 2024 17:25:09 +0000 (10:25 -0700)
The boilerplate sucks but I haven't thought of something good.

Content.Client/SurveillanceCamera/UI/SurveillanceCameraSetupBoundUi.cs

index 1880e431eea7a1e12a998c294ebae8ec60ea71ba..295724788e591739ea0b5feceb3f90b7ec7e3317 100644 (file)
@@ -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;
         }
     }
 }