diff options
Diffstat (limited to 'win/CS')
-rw-r--r-- | win/CS/HandBrakeWPF/Services/Scan/LibScan.cs | 4 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/win/CS/HandBrakeWPF/Services/Scan/LibScan.cs b/win/CS/HandBrakeWPF/Services/Scan/LibScan.cs index fdeb88b2d..eac84f263 100644 --- a/win/CS/HandBrakeWPF/Services/Scan/LibScan.cs +++ b/win/CS/HandBrakeWPF/Services/Scan/LibScan.cs @@ -144,8 +144,7 @@ namespace HandBrakeWPF.Services.Scan { this.ServiceLogMessage("Stopping Scan ..."); this.IsScanning = false; - this.instance.StopScan(); - this.ServiceLogMessage("Scan Stopped ..."); + this.instance.StopScan(); } catch (Exception exc) { @@ -154,6 +153,7 @@ namespace HandBrakeWPF.Services.Scan finally { this.ScanCompleted?.Invoke(this, new ScanCompletedEventArgs(this.isCancelled, null, null, null)); + this.ServiceLogMessage("Scan Stopped ..."); } } diff --git a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs index c11400bd7..c8a59bbbc 100644 --- a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs @@ -2336,6 +2336,8 @@ namespace HandBrakeWPF.ViewModels /// </param>
private void ScanCompleted(object sender, ScanCompletedEventArgs e)
{
+ this.ShowStatusWindow = false;
+
if (e.ScannedSource != null && !e.Cancelled)
{
if (this.ScannedSource == null)
@@ -2351,9 +2353,7 @@ namespace HandBrakeWPF.ViewModels Execute.OnUIThread(() =>
{
- this.ShowStatusWindow = false;
-
- if (e.Successful)
+ if (e.Successful && this.ScannedSource != null)
{
this.NotifyOfPropertyChange(() => this.ScannedSource);
this.NotifyOfPropertyChange(() => this.ScannedSource.Titles);
|