Fix surveillance camera closing (#28374)

The boilerplate sucks but I haven't thought of something good.
This commit is contained in:
metalgearsloth
2024-05-30 03:25:09 +10:00
committed by GitHub
parent ca34b5dc75
commit a90cb25ef7

View File

@@ -31,7 +31,7 @@ public sealed class SurveillanceCameraSetupBoundUi : BoundUserInterface
_window.OpenCentered(); _window.OpenCentered();
_window.OnNameConfirm += SendDeviceName; _window.OnNameConfirm += SendDeviceName;
_window.OnNetworkConfirm += SendSelectedNetwork; _window.OnNetworkConfirm += SendSelectedNetwork;
_window.OnClose += Close;
} }
private void SendSelectedNetwork(int idx) private void SendSelectedNetwork(int idx)
@@ -63,7 +63,8 @@ public sealed class SurveillanceCameraSetupBoundUi : BoundUserInterface
if (disposing) if (disposing)
{ {
_window!.Dispose(); _window?.Dispose();
_window = null;
} }
} }
} }