diff options
author | sr55 <[email protected]> | 2017-01-14 19:16:46 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2017-01-14 19:16:46 +0000 |
commit | 37c850933585d8413e47142a197e642bd746c02a (patch) | |
tree | 1a7724a836a77cd1695cae04bd1183017991bc50 /win | |
parent | 4c8d30ae5f433ac80cc5c55b4853188a0df90db4 (diff) |
WinGui: Fix a crash when saving presets for video encoders that don't have preset or profile options. #516
Diffstat (limited to 'win')
-rw-r--r-- | win/CS/HandBrakeWPF/Services/Presets/Factories/JsonPresetFactory.cs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/win/CS/HandBrakeWPF/Services/Presets/Factories/JsonPresetFactory.cs b/win/CS/HandBrakeWPF/Services/Presets/Factories/JsonPresetFactory.cs index 4a2c973c6..c31495537 100644 --- a/win/CS/HandBrakeWPF/Services/Presets/Factories/JsonPresetFactory.cs +++ b/win/CS/HandBrakeWPF/Services/Presets/Factories/JsonPresetFactory.cs @@ -622,10 +622,10 @@ namespace HandBrakeWPF.Services.Presets.Factories preset.VideoFramerate = export.Task.Framerate.ToString();
preset.VideoFramerateMode = EnumHelper<FramerateMode>.GetShortName(export.Task.FramerateMode);
preset.VideoGrayScale = export.Task.Grayscale;
- preset.VideoLevel = export.Task.VideoLevel.ShortName;
+ preset.VideoLevel = export.Task.VideoLevel != null ? export.Task.VideoLevel.ShortName : null;
preset.VideoOptionExtra = export.Task.ExtraAdvancedArguments;
- preset.VideoPreset = export.Task.VideoPreset.ShortName;
- preset.VideoProfile = export.Task.VideoProfile.ShortName;
+ preset.VideoPreset = export.Task.VideoPreset != null ? export.Task.VideoPreset.ShortName : null;
+ preset.VideoProfile = export.Task.VideoProfile != null ? export.Task.VideoProfile.ShortName : null;
preset.VideoQSVAsyncDepth = 4; // Defaulted to 4 for now.
preset.VideoQSVDecode = !config.DisableQuickSyncDecoding;
preset.VideoQualitySlider = export.Task.Quality.HasValue ? export.Task.Quality.Value : 0;
|