summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
Diffstat (limited to 'win')
-rw-r--r--win/CS/HandBrakeWPF/Services/Presets/PresetService.cs5
1 files changed, 5 insertions, 0 deletions
diff --git a/win/CS/HandBrakeWPF/Services/Presets/PresetService.cs b/win/CS/HandBrakeWPF/Services/Presets/PresetService.cs
index 11e448c62..e9e36a43b 100644
--- a/win/CS/HandBrakeWPF/Services/Presets/PresetService.cs
+++ b/win/CS/HandBrakeWPF/Services/Presets/PresetService.cs
@@ -160,6 +160,11 @@ namespace HandBrakeWPF.Services.Presets
foreach (var objectPreset in container.PresetList)
{
HBPresetCategory category = JsonConvert.DeserializeObject<HBPresetCategory>(objectPreset.ToString());
+ if (category == null || category.ChildrenArray == null || category.ChildrenArray.Count == 0)
+ {
+ continue; // Ignore empty preset categories.
+ }
+
if (category != null && category.ChildrenArray != null && category.ChildrenArray.Count > 0)
{
foreach (HBPreset hbPreset in category.ChildrenArray)