Skip to content

Commit 40d2d58

Browse files
committed
Fix InvalidOperationException
1 parent 589fefc commit 40d2d58

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Flow.Launcher/MainWindow.xaml.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,8 @@ private async void OnClosing(object sender, CancelEventArgs e)
296296
Notification.Uninstall();
297297
// After plugins are all disposed, we can close the main window
298298
_canClose = true;
299-
Close();
299+
// Use this instead of Close() to avoid InvalidOperationException when calling Close() in OnClosing event
300+
Application.Current.Shutdown();
300301
}
301302
}
302303

0 commit comments

Comments
 (0)