using System.Globalization;\r
using System.Windows.Data;\r
\r
- using HandBrake.Interop.Utilities;\r
-\r
using HandBrakeWPF.Model;\r
using HandBrakeWPF.Utilities;\r
\r
/// </returns>\r
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r
{\r
- return EnumHelper<OptionsTab>.GetDisplay((OptionsTab)value);\r
+ if (value != null)\r
+ {\r
+ return EnumHelper<OptionsTab>.GetDisplay((OptionsTab)value);\r
+ }\r
+\r
+ return null;\r
}\r
\r
/// <summary>\r
/// </returns>\r
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r
{\r
- return EnumHelper<OptionsTab>.GetValue(value.ToString());\r
+ if (value != null)\r
+ {\r
+ return EnumHelper<OptionsTab>.GetValue(value.ToString());\r
+ }\r
+\r
+ return null;\r
}\r
}\r
}
\ No newline at end of file