summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrakeWPF/App.xaml.cs
diff options
context:
space:
mode:
authorsr55 <[email protected]>2017-04-13 19:46:15 +0100
committersr55 <[email protected]>2017-04-13 19:46:15 +0100
commit5dd46e3d4b9029e33a353b9962fea3b8c3c399e4 (patch)
treed34c164db76b181704d7844af98f350f2502c5b5 /win/CS/HandBrakeWPF/App.xaml.cs
parente568d96f313009f5dd32bd850a48b9ac1a37a56b (diff)
WinGui: Strip out some out some legacy code that was causing some threading issues.
Diffstat (limited to 'win/CS/HandBrakeWPF/App.xaml.cs')
-rw-r--r--win/CS/HandBrakeWPF/App.xaml.cs20
1 files changed, 11 insertions, 9 deletions
diff --git a/win/CS/HandBrakeWPF/App.xaml.cs b/win/CS/HandBrakeWPF/App.xaml.cs
index 85f4e3902..39eb6c0bc 100644
--- a/win/CS/HandBrakeWPF/App.xaml.cs
+++ b/win/CS/HandBrakeWPF/App.xaml.cs
@@ -94,15 +94,17 @@ namespace HandBrakeWPF
/// </param>
private void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)
{
- if (e.ExceptionObject.GetType() == typeof(FileNotFoundException))
- {
- GeneralApplicationException exception = new GeneralApplicationException("A file appears to be missing.", "Try re-installing Microsoft .NET Framework 4.0", (Exception)e.ExceptionObject);
- this.ShowError(exception);
- }
- else
- {
- this.ShowError(e.ExceptionObject);
- }
+ Caliburn.Micro.Execute.OnUIThreadAsync(() => {
+ if (e.ExceptionObject.GetType() == typeof(FileNotFoundException))
+ {
+ GeneralApplicationException exception = new GeneralApplicationException("A file appears to be missing.", "Try re-installing Microsoft .NET Framework 4.0", (Exception)e.ExceptionObject);
+ this.ShowError(exception);
+ }
+ else
+ {
+ this.ShowError(e.ExceptionObject);
+ }
+ });
}
/// <summary>