diff --git a/ALOTInstallerWPF/MainWindow.xaml.cs b/ALOTInstallerWPF/MainWindow.xaml.cs index 673e4d65..53ce419f 100644 --- a/ALOTInstallerWPF/MainWindow.xaml.cs +++ b/ALOTInstallerWPF/MainWindow.xaml.cs @@ -94,7 +94,15 @@ public Task GetFlyoutResponse(string topText, params Button[] buttons) var content = new FlyoutDialogPanel(topText, buttons, selectedOption => { - tcs.SetResult(selectedOption); + // If user clicks too fast this can cause an exception. + try + { + tcs.SetResult(selectedOption); + } + catch + { + } + BottomBasicDialog.IsOpen = false; }); BottomBasicDialog.Content = null; //clear