+2008-06-05 Jonathan Pobst <monkey@jpobst.com>
+
+ * DataGridViewCell.cs: Ensure we don't pass null to GetConverter.
+
2008-06-05 Carlos Alberto Cortez <calberto.cortez@gmail.com>
* XplatUIX1..cs: Use IntPtr size instead of int, as wee need to work
DataGridViewCellStyle style = InheritedStyle;
- TypeConverter source = TypeDescriptor.GetConverter (valueType);
- TypeConverter dest = TypeDescriptor.GetConverter (FormattedValueType);
+ TypeConverter source = null;
+ TypeConverter dest = null;
+
+ if (ValueType != null)
+ source = TypeDescriptor.GetConverter (valueType);
+
+ if (FormattedValueType != null)
+ dest = TypeDescriptor.GetConverter (FormattedValueType);
return GetFormattedValue (Value, RowIndex, ref style, source, dest, DataGridViewDataErrorContexts.Formatting);
}