Skip to content

Commit d2ab212

Browse files
committed
WinGui: Fix an error when trying to encode an item with no destination.
1 parent 88b0c6e commit d2ab212

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1534,6 +1534,15 @@ public bool AddToQueue()
15341534
return false;
15351535
}
15361536

1537+
1538+
if (!DriveUtilities.HasMinimumDiskSpace(
1539+
this.Destination,
1540+
this.userSettingService.GetUserSetting<long>(UserSettingConstants.PauseOnLowDiskspaceLevel)))
1541+
{
1542+
this.errorService.ShowMessageBox(Resources.Main_LowDiskspace, Resources.Error, MessageBoxButton.OK, MessageBoxImage.Error);
1543+
return false;
1544+
}
1545+
15371546
// Sanity check the filename
15381547
if (!string.IsNullOrEmpty(this.Destination) && FileHelper.FilePathHasInvalidChars(this.Destination))
15391548
{
@@ -1740,14 +1749,6 @@ public void StartEncode()
17401749
return;
17411750
}
17421751

1743-
if (!DriveUtilities.HasMinimumDiskSpace(
1744-
this.Destination,
1745-
this.userSettingService.GetUserSetting<long>(UserSettingConstants.PauseOnLowDiskspaceLevel)))
1746-
{
1747-
this.errorService.ShowMessageBox(Resources.Main_LowDiskspace, Resources.Error, MessageBoxButton.OK, MessageBoxImage.Error);
1748-
return;
1749-
}
1750-
17511752
// Create the Queue Task and Start Processing
17521753
if (this.AddToQueue())
17531754
{

0 commit comments

Comments
 (0)