[winforms] Style
[mono.git] / mcs / class / System.Drawing / System.Drawing / SizeConverter.cs
index 587e631324c770e71970452163f85167a2b18d26..ba8d266cac454af73fc51306aa2103ed28c063c7 100644 (file)
@@ -68,6 +68,8 @@ namespace System.Drawing {
                                                    CultureInfo culture,
                                                    object value)
                {
+                       if (culture == null)
+                               culture = CultureInfo.CurrentCulture;
                        string s = value as string;
                        if (s == null)
                                return base.ConvertFrom (context, culture, value);
@@ -91,6 +93,8 @@ namespace System.Drawing {
                                                  object value,
                                                  Type destinationType)
                {
+                       if (culture == null)
+                               culture = CultureInfo.CurrentCulture;
                        // LAMESPEC: "The default implementation calls the ToString method
                        // of the object if the object is valid and if the destination
                        // type is string." MS does not behave as per the specs.