]> granicus.if.org Git - handbrake/commitdiff
WinGui: Fix a crash in the AudioViewModel when no Behaviour Tracks or fallback encode...
authorsr55 <sr55.hb@outlook.com>
Sat, 1 Jun 2019 12:39:58 +0000 (13:39 +0100)
committersr55 <sr55.hb@outlook.com>
Sat, 1 Jun 2019 12:40:09 +0000 (13:40 +0100)
win/CS/HandBrakeWPF/ViewModels/AudioViewModel.cs

index aacc4b7d28c4c31eb1d93d3a2da12f64da3e8269..610ad478eb6c25847d28f15f97a355c347c40d03 100644 (file)
@@ -457,7 +457,7 @@ namespace HandBrakeWPF.ViewModels
 \r
         private bool CanAddTrack(AudioBehaviourTrack track, Audio sourceTrack, AudioEncoder fallback)\r
         {\r
-            if (fallback == AudioEncoder.None)\r
+            if (fallback == AudioEncoder.None && track != null)\r
             {\r
                 HBAudioEncoder encoderInfo = HandBrakeEncoderHelpers.GetAudioEncoder(EnumHelper<AudioEncoder>.GetShortName(track.Encoder));\r
                 if (track.IsPassthru && (sourceTrack.Codec & encoderInfo.Id) == 0)\r