diff options
author | sr55 <[email protected]> | 2017-04-16 10:59:40 +0100 |
---|---|---|
committer | sr55 <[email protected]> | 2017-04-16 10:59:40 +0100 |
commit | 75fbd0a2ca924482c81e65279c76cf9a7506626c (patch) | |
tree | 80f85333fb31ab297843765ce3af9c2d9efd2946 /win/CS/HandBrakeWPF | |
parent | bb92ab00e37bdb87b528b1901d956c1f24417387 (diff) |
WinGui: Fix a possible exception when cancelling and rescanning a source that would cause it to never complete the second time. Fixes #671
Diffstat (limited to 'win/CS/HandBrakeWPF')
-rw-r--r-- | win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs index 9bb991efc..0c4637e6f 100644 --- a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs @@ -2336,8 +2336,12 @@ namespace HandBrakeWPF.ViewModels /// </param>
private void ScanCompleted(object sender, ScanCompletedEventArgs e)
{
- if (e.ScannedSource != null)
+ if (e.ScannedSource != null && !e.Cancelled)
{
+ if (this.ScannedSource == null)
+ {
+ this.ScannedSource = new Source();
+ }
e.ScannedSource.CopyTo(this.ScannedSource);
}
else
|