summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsr55 <[email protected]>2017-04-11 15:01:55 +0100
committersr55 <[email protected]>2017-04-11 15:01:55 +0100
commit2aa7640a1fcb8485fd929b189b34e07e6f81cfcc (patch)
tree63542a555ca9466e80e7cc9ed239702d7ea6333e
parentec65fcbcc62ad86b275e1c1a36ae1bb1672771e4 (diff)
WinGui: Fix a potential crash in the audio track mixdown handling code.
-rw-r--r--win/CS/HandBrakeWPF/Services/Encode/Model/Models/AudioTrack.cs2
1 files changed, 1 insertions, 1 deletions
diff --git a/win/CS/HandBrakeWPF/Services/Encode/Model/Models/AudioTrack.cs b/win/CS/HandBrakeWPF/Services/Encode/Model/Models/AudioTrack.cs
index 5d0333311..472eccb7f 100644
--- a/win/CS/HandBrakeWPF/Services/Encode/Model/Models/AudioTrack.cs
+++ b/win/CS/HandBrakeWPF/Services/Encode/Model/Models/AudioTrack.cs
@@ -125,7 +125,7 @@ namespace HandBrakeWPF.Services.Encode.Model.Models
this.mixDown = track.MixDown != null ? track.MixDown.ShortName : "dpl2";
// If the mixdown isn't supported, downgrade it.
- if (!HandBrakeEncoderHelpers.MixdownIsSupported(track.MixDown, encoderInfo, sourceTrack.ChannelLayout))
+ if (encoderInfo != null && !HandBrakeEncoderHelpers.MixdownIsSupported(track.MixDown, encoderInfo, sourceTrack.ChannelLayout))
{
HBMixdown changedMixdown = HandBrakeEncoderHelpers.GetDefaultMixdown(encoderInfo, (ulong)sourceTrack.ChannelLayout);
if (changedMixdown != null)