diff options
author | sr55 <[email protected]> | 2011-08-11 12:22:56 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2011-08-11 12:22:56 +0000 |
commit | dbc58639a0fa42cae9e884a50d6f8051516cfb6c (patch) | |
tree | 5a032fe42a672468ad3236c4226a39994c1d2488 /win/CS | |
parent | 8f930a4ecbf1bbb3f658fae5bdeb7c272ff4250e (diff) |
WinGui: Fix a NullPointerException in the AudioPanel that was causing some funny behaviour when switching presets and scanning sources.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4165 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS')
-rw-r--r-- | win/CS/Controls/AudioPanel.cs | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/win/CS/Controls/AudioPanel.cs b/win/CS/Controls/AudioPanel.cs index 19fe24787..0d7c1db77 100644 --- a/win/CS/Controls/AudioPanel.cs +++ b/win/CS/Controls/AudioPanel.cs @@ -192,8 +192,7 @@ namespace Handbrake.Controls this.ScannedTracks.Clear();
if (selectedTitle.AudioTracks.Count == 0)
- {
-
+ {
this.ScannedTracks.Add(AudioHelper.NoneFound);
this.drp_audioTrack.Refresh();
drp_audioTrack.SelectedIndex = 0;
@@ -960,6 +959,12 @@ namespace Handbrake.Controls /// </returns>
private bool IsIncompatiblePassthru(AudioTrack track)
{
+ if (track.ScannedTrack == null || string.IsNullOrEmpty(track.ScannedTrack.Format))
+ {
+ return false;
+ }
+
+
// If the track isn't AC3, and the encoder is, change it.
if (track.Encoder == AudioEncoder.Ac3Passthrough && !track.ScannedTrack.Format.Contains("AC3"))
{
|