diff --git a/src/Controls/tests/DeviceTests/ControlsHandlerTestBase.iOS.cs b/src/Controls/tests/DeviceTests/ControlsHandlerTestBase.iOS.cs index a55a586cf284..aba406b7a6cc 100644 --- a/src/Controls/tests/DeviceTests/ControlsHandlerTestBase.iOS.cs +++ b/src/Controls/tests/DeviceTests/ControlsHandlerTestBase.iOS.cs @@ -52,7 +52,7 @@ Task SetupWindowForTests(IWindow window, Func runTests, IMauiCon await whs.FinishedDisconnecting; } else - window.Handler.DisconnectHandler(); + window.Handler?.DisconnectHandler(); var vc = (window.Content?.Handler as IPlatformViewHandler)?