diff options
author | sr55 <[email protected]> | 2019-06-01 13:39:58 +0100 |
---|---|---|
committer | sr55 <[email protected]> | 2019-06-01 13:40:09 +0100 |
commit | 2817b704da45a0a97c768997b3b1ebb8004dfe45 (patch) | |
tree | faf8ba2edeb191132e2329ce4f083f490d8ada1c /win/CS | |
parent | 7cf0e78155c1611d2055175d4b37fb04414f55c7 (diff) |
WinGui: Fix a crash in the AudioViewModel when no Behaviour Tracks or fallback encoder are set.
Diffstat (limited to 'win/CS')
-rw-r--r-- | win/CS/HandBrakeWPF/ViewModels/AudioViewModel.cs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/win/CS/HandBrakeWPF/ViewModels/AudioViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/AudioViewModel.cs index aacc4b7d2..610ad478e 100644 --- a/win/CS/HandBrakeWPF/ViewModels/AudioViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/AudioViewModel.cs @@ -457,7 +457,7 @@ namespace HandBrakeWPF.ViewModels private bool CanAddTrack(AudioBehaviourTrack track, Audio sourceTrack, AudioEncoder fallback)
{
- if (fallback == AudioEncoder.None)
+ if (fallback == AudioEncoder.None && track != null)
{
HBAudioEncoder encoderInfo = HandBrakeEncoderHelpers.GetAudioEncoder(EnumHelper<AudioEncoder>.GetShortName(track.Encoder));
if (track.IsPassthru && (sourceTrack.Codec & encoderInfo.Id) == 0)
|