diff options
Diffstat (limited to 'src/CompilerServices/CompilerServices.cs')
| -rw-r--r-- | src/CompilerServices/CompilerServices.cs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/CompilerServices/CompilerServices.cs b/src/CompilerServices/CompilerServices.cs index b2f2e14c..bedb554f 100644 --- a/src/CompilerServices/CompilerServices.cs +++ b/src/CompilerServices/CompilerServices.cs @@ -199,8 +199,10 @@ namespace go if (miDst.MemberType == MemberTypes.Property) { PropertyInfo piDst = miDst as PropertyInfo; //TODO: handle other dest type conversions - if (piDst.PropertyType == typeof(string)) - srcVal = srcVal.ToString (); + if (piDst.PropertyType == typeof(string)){ + if (srcVal != null) + srcVal = srcVal.ToString (); + } piDst.GetSetMethod ().Invoke (binding.Source, new object[] { srcVal }); } else if (miDst.MemberType == MemberTypes.Field) { FieldInfo fiDst = miDst as FieldInfo; |