summaryrefslogtreecommitdiffstats
path: root/win/CS/Functions/PresetLoader.cs
diff options
context:
space:
mode:
Diffstat (limited to 'win/CS/Functions/PresetLoader.cs')
-rw-r--r--win/CS/Functions/PresetLoader.cs8
1 files changed, 3 insertions, 5 deletions
diff --git a/win/CS/Functions/PresetLoader.cs b/win/CS/Functions/PresetLoader.cs
index 5e95cfcf2..980e4e4d3 100644
--- a/win/CS/Functions/PresetLoader.cs
+++ b/win/CS/Functions/PresetLoader.cs
@@ -148,11 +148,9 @@ namespace Handbrake.Functions
mainWindow.PictureSettings.text_height.Value = presetQuery.MaxHeight.Value;
}
- if (presetQuery.MaxHeight.HasValue && presetQuery.MaxWidth.HasValue)
- {
- mainWindow.PictureSettings.PresetMaximumResolution = new Size(
- presetQuery.MaxWidth.Value, presetQuery.MaxHeight.Value);
- }
+ mainWindow.PictureSettings.PresetMaximumResolution = new Size(
+ presetQuery.MaxWidth.HasValue ? presetQuery.MaxWidth.Value : 0,
+ presetQuery.MaxHeight.HasValue ? presetQuery.MaxHeight.Value : 0);
// Case where both height and max height are 0 - For built-in presets
if (presetQuery.MaxHeight == 0 && presetQuery.Height == 0)