Skip to content

Commit

Permalink
Fix crash from telemetry: Clicking the options button too fast would …
Browse files Browse the repository at this point in the history
…cause crash
  • Loading branch information
Mgamerz committed Nov 7, 2020
1 parent a92fd54 commit c970a68
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion ALOTInstallerWPF/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,15 @@ public Task<int> 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
Expand Down

0 comments on commit c970a68

Please sign in to comment.