From: sr55 Date: Sun, 16 Dec 2018 10:30:52 +0000 (+0000) Subject: WinGui: Fix an error when trying to encode an item with no destination. X-Git-Tag: 1.2.0~2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d2ab2122b26cd97961887ae1228692ade5e647f7;p=handbrake WinGui: Fix an error when trying to encode an item with no destination. --- diff --git a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs index 367318080..0aa0cdd59 100644 --- a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs @@ -1534,6 +1534,15 @@ namespace HandBrakeWPF.ViewModels return false; } + + if (!DriveUtilities.HasMinimumDiskSpace( + this.Destination, + this.userSettingService.GetUserSetting(UserSettingConstants.PauseOnLowDiskspaceLevel))) + { + this.errorService.ShowMessageBox(Resources.Main_LowDiskspace, Resources.Error, MessageBoxButton.OK, MessageBoxImage.Error); + return false; + } + // Sanity check the filename if (!string.IsNullOrEmpty(this.Destination) && FileHelper.FilePathHasInvalidChars(this.Destination)) { @@ -1740,14 +1749,6 @@ namespace HandBrakeWPF.ViewModels return; } - if (!DriveUtilities.HasMinimumDiskSpace( - this.Destination, - this.userSettingService.GetUserSetting(UserSettingConstants.PauseOnLowDiskspaceLevel))) - { - this.errorService.ShowMessageBox(Resources.Main_LowDiskspace, Resources.Error, MessageBoxButton.OK, MessageBoxImage.Error); - return; - } - // Create the Queue Task and Start Processing if (this.AddToQueue()) {