We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e2a04ac commit 146f4baCopy full SHA for 146f4ba
src/Controls/src/Core/Window/Window.cs
@@ -546,11 +546,11 @@ void IWindow.Destroying()
546
AlertManager.Unsubscribe();
547
Application?.RemoveWindow(this);
548
549
- // Dispose the window-scoped service scope
550
- if (Handler?.MauiContext is MauiContext mauiContext)
551
- mauiContext.DisposeWindowScope();
552
-
+ var mauiContext = Handler?.MauiContext as MauiContext;
553
Handler?.DisconnectHandler();
+
+ // Dispose the window-scoped service scope
+ mauiContext?.DisposeWindowScope();
554
}
555
556
void IWindow.Resumed()
0 commit comments