Skip to content

Commit ff036dc

Browse files
author
RandomEngy
committed
Added code to make sure the finished file exists before playing it.
1 parent a0ad38d commit ff036dc

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

VidCoder/View/MainWindow.xaml.cs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,16 @@ protected void HandleCompletedItemDoubleClick(object sender, MouseButtonEventArg
484484
var encodeResultVM = ((ListViewItem)sender).Content as EncodeResultViewModel;
485485
if (encodeResultVM.EncodeResult.Succeeded)
486486
{
487-
FileService.Instance.LaunchFile(encodeResultVM.EncodeResult.Destination);
487+
string resultFile = encodeResultVM.EncodeResult.Destination;
488+
489+
if (File.Exists(resultFile))
490+
{
491+
FileService.Instance.LaunchFile(encodeResultVM.EncodeResult.Destination);
492+
}
493+
else
494+
{
495+
MessageBox.Show(resultFile + " does not exist.");
496+
}
488497
}
489498
}
490499

0 commit comments

Comments
 (0)