diff options
Diffstat (limited to 'win')
-rw-r--r-- | win/CS/HandBrakeWPF/Services/Encode/Factories/EncodeTaskFactory.cs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/win/CS/HandBrakeWPF/Services/Encode/Factories/EncodeTaskFactory.cs b/win/CS/HandBrakeWPF/Services/Encode/Factories/EncodeTaskFactory.cs index 35bd86c39..5ad0ef13e 100644 --- a/win/CS/HandBrakeWPF/Services/Encode/Factories/EncodeTaskFactory.cs +++ b/win/CS/HandBrakeWPF/Services/Encode/Factories/EncodeTaskFactory.cs @@ -347,7 +347,9 @@ namespace HandBrakeWPF.Services.Encode.Factories audio.CopyMask = copyMaskList.ToArray(); HBAudioEncoder audioEncoder = HandBrakeEncoderHelpers.GetAudioEncoder(EnumHelper<AudioEncoder>.GetShortName(job.AllowedPassthruOptions.AudioEncoderFallback)); - audio.FallbackEncoder = audioEncoder.ShortName; + audio.FallbackEncoder = audioEncoder?.ShortName; + + Validate.NotNull(audio.FallbackEncoder, string.Format("Unrecognized audio encoder: {0} \n", job.AllowedPassthruOptions.AudioEncoderFallback)); audio.AudioList = new List<HandBrake.Interop.Interop.Json.Encode.AudioTrack>(); foreach (AudioTrack item in job.AudioTracks) |