summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--win/CS/HandBrakeWPF/Converters/Options/OptionsTabNameConverter.cs16
1 files changed, 12 insertions, 4 deletions
diff --git a/win/CS/HandBrakeWPF/Converters/Options/OptionsTabNameConverter.cs b/win/CS/HandBrakeWPF/Converters/Options/OptionsTabNameConverter.cs
index 5c0fb47f0..26919a351 100644
--- a/win/CS/HandBrakeWPF/Converters/Options/OptionsTabNameConverter.cs
+++ b/win/CS/HandBrakeWPF/Converters/Options/OptionsTabNameConverter.cs
@@ -13,8 +13,6 @@ namespace HandBrakeWPF.Converters.Options
using System.Globalization;
using System.Windows.Data;
- using HandBrake.Interop.Utilities;
-
using HandBrakeWPF.Model;
using HandBrakeWPF.Utilities;
@@ -43,7 +41,12 @@ namespace HandBrakeWPF.Converters.Options
/// </returns>
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
- return EnumHelper<OptionsTab>.GetDisplay((OptionsTab)value);
+ if (value != null)
+ {
+ return EnumHelper<OptionsTab>.GetDisplay((OptionsTab)value);
+ }
+
+ return null;
}
/// <summary>
@@ -66,7 +69,12 @@ namespace HandBrakeWPF.Converters.Options
/// </returns>
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
- return EnumHelper<OptionsTab>.GetValue(value.ToString());
+ if (value != null)
+ {
+ return EnumHelper<OptionsTab>.GetValue(value.ToString());
+ }
+
+ return null;
}
}
} \ No newline at end of file