summaryrefslogtreecommitdiffstats
path: root/win/CS/Functions/QueryGenerator.cs
diff options
context:
space:
mode:
authorsr55 <[email protected]>2011-09-24 22:15:17 +0000
committersr55 <[email protected]>2011-09-24 22:15:17 +0000
commit6edc65ef71072a5ebc519cecf267dbf457bee2a6 (patch)
tree520a7d265a89f88bc61b0a45a16feae91db00ea9 /win/CS/Functions/QueryGenerator.cs
parentf62a6501bae828a835383e6226f3bd86173e36ae (diff)
WinGui: Some further fixes to the preset code. Plist import fixes. (Still need to update the imported to work with new settings)
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4247 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/Functions/QueryGenerator.cs')
-rw-r--r--win/CS/Functions/QueryGenerator.cs9
1 files changed, 8 insertions, 1 deletions
diff --git a/win/CS/Functions/QueryGenerator.cs b/win/CS/Functions/QueryGenerator.cs
index ac5947ba6..c042daa79 100644
--- a/win/CS/Functions/QueryGenerator.cs
+++ b/win/CS/Functions/QueryGenerator.cs
@@ -69,7 +69,14 @@ namespace Handbrake.Functions
query += GenerateTabbedComponentsQuery(mainWindow, true, QueryPictureSettingsMode.UserInterfaceSettings, 0, 0);
// Create the Queue Task and setup the EncodeTask model object.
- Preset preset = mainWindow.treeView_presets.SelectedNode.Tag as Preset;
+
+
+ Preset preset = null;
+ if (mainWindow.treeView_presets.SelectedNode != null)
+ {
+ preset = mainWindow.treeView_presets.SelectedNode.Tag as Preset;
+ }
+
bool isCustom = true;
if (preset != null && preset.IsBuildIn)
{