Skip to content

Commit 8dc61a1

Browse files
committed
Fixed reported crash on stopping encodes.
1 parent 3db20d2 commit 8dc61a1

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

VidCoder/Services/ProcessingService.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -688,7 +688,8 @@ public ICommand StopEncode
688688
return this.stopEncode ?? (this.stopEncode = ReactiveCommand.Create(
689689
() =>
690690
{
691-
if (this.EncodeQueue.Items.First().EncodeTime > TimeSpan.FromMinutes(StopWarningThresholdMinutes))
691+
var firstItem = this.EncodeQueue.Items.FirstOrDefault();
692+
if (firstItem != null && firstItem.EncodeTime > TimeSpan.FromMinutes(StopWarningThresholdMinutes))
692693
{
693694
MessageBoxResult dialogResult = Utilities.MessageBox.Show(
694695
MainRes.StopEncodeConfirmationMessage,

0 commit comments

Comments
 (0)