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 c0f7dc0 commit 356e45dCopy full SHA for 356e45d
src/Controls/src/Core/Window/Window.cs
@@ -553,11 +553,11 @@ void IWindow.Destroying()
553
AlertManager.Unsubscribe();
554
Application?.RemoveWindow(this);
555
556
- // Dispose the window-scoped service scope
557
- if (Handler?.MauiContext is MauiContext mauiContext)
558
- mauiContext.DisposeWindowScope();
559
-
+ var mauiContext = Handler?.MauiContext as MauiContext;
560
Handler?.DisconnectHandler();
+
+ // Dispose the window-scoped service scope
+ mauiContext?.DisposeWindowScope();
561
}
562
563
void IWindow.Resumed()
0 commit comments