diff options
author | sr55 <[email protected]> | 2017-01-14 19:16:46 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2017-01-14 19:24:32 +0000 |
commit | a4e2f796c7caba7367f41288c0ecd31bd7eda568 (patch) | |
tree | 6be7e2b10ad55586b9a941b72fa0937a19da87ca /win | |
parent | b14d0070a0e62cbb2e90359aedf7b3635ea0f40d (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;
|