diff options
author | sr55 <[email protected]> | 2017-07-05 19:35:28 +0100 |
---|---|---|
committer | sr55 <[email protected]> | 2017-07-05 19:35:56 +0100 |
commit | 1c8c97e97a373602b238dff792e508e1a1a2bcde (patch) | |
tree | f61b816bf4111e5c42bb6e9f3973d4959a6eef94 | |
parent | 9148528a2a2d8c944ecc7a589b059a45418244d1 (diff) |
WinGui: Make the Preset Import system a bit more robust. #808
-rw-r--r-- | win/CS/HandBrake.ApplicationServices/Interop/Json/Presets/HBPreset.cs | 2 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/Services/Presets/PresetService.cs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/win/CS/HandBrake.ApplicationServices/Interop/Json/Presets/HBPreset.cs b/win/CS/HandBrake.ApplicationServices/Interop/Json/Presets/HBPreset.cs index 1df789cb2..118b5cbf7 100644 --- a/win/CS/HandBrake.ApplicationServices/Interop/Json/Presets/HBPreset.cs +++ b/win/CS/HandBrake.ApplicationServices/Interop/Json/Presets/HBPreset.cs @@ -311,7 +311,7 @@ namespace HandBrake.ApplicationServices.Interop.Json.Presets /// <summary>
/// Gets or sets the video avg bitrate.
/// </summary>
- public int VideoAvgBitrate { get; set; }
+ public int? VideoAvgBitrate { get; set; }
/// <summary>
/// Gets or sets the video color matrix code.
diff --git a/win/CS/HandBrakeWPF/Services/Presets/PresetService.cs b/win/CS/HandBrakeWPF/Services/Presets/PresetService.cs index b581becb2..14001040e 100644 --- a/win/CS/HandBrakeWPF/Services/Presets/PresetService.cs +++ b/win/CS/HandBrakeWPF/Services/Presets/PresetService.cs @@ -198,7 +198,7 @@ namespace HandBrakeWPF.Services.Presets foreach (var objectPreset in container.PresetList)
{
PresetCategory category = JsonConvert.DeserializeObject<PresetCategory>(objectPreset.ToString());
- if (category != null && category.ChildrenArray.Count > 0)
+ if (category != null && category.ChildrenArray != null && category.ChildrenArray.Count > 0)
{
foreach (HBPreset hbPreset in category.ChildrenArray)
{
|