diff options
author | sr55 <[email protected]> | 2008-12-07 23:24:27 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2008-12-07 23:24:27 +0000 |
commit | 7d58436249e353809f58c0373f95b06e6c531253 (patch) | |
tree | 4bbc4a71e7cbaccae1641d64740f0edbc3d311be /win/C#/frmMain.cs | |
parent | ec2c6611b5c0c36c1270e6d3143681281518be8d (diff) |
WinGui:
- Fixes an issue where if there are no presets, that is, the user removed them all, then the GUI would throw a null pointer exception after scanning a source.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2016 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/C#/frmMain.cs')
-rw-r--r-- | win/C#/frmMain.cs | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/win/C#/frmMain.cs b/win/C#/frmMain.cs index 54a698f5e..f70643731 100644 --- a/win/C#/frmMain.cs +++ b/win/C#/frmMain.cs @@ -709,12 +709,15 @@ namespace Handbrake drp_track1Audio.Items.AddRange(selectedTitle.AudioTracks.ToArray());
drp_track1Audio.SelectedIndex = 0;
- if (!treeView_presets.SelectedNode.Text.Contains("AppleTV"))
+ if (treeView_presets.Nodes.Count != 0)
{
- drp_track2Audio.Items.Clear();
- drp_track2Audio.Items.Add("None");
- drp_track2Audio.Items.AddRange(selectedTitle.AudioTracks.ToArray());
- drp_track2Audio.SelectedIndex = 0;
+ if (!treeView_presets.SelectedNode.Text.Contains("AppleTV"))
+ {
+ drp_track2Audio.Items.Clear();
+ drp_track2Audio.Items.Add("None");
+ drp_track2Audio.Items.AddRange(selectedTitle.AudioTracks.ToArray());
+ drp_track2Audio.SelectedIndex = 0;
+ }
}
drp_track3Audio.Items.Clear();
|