From 61aeb72522c4ad315fed13d8ddd3d73f7a21bc2a Mon Sep 17 00:00:00 2001 From: jpbruyere Date: Sun, 28 Jun 2015 10:23:42 +0200 Subject: * OpenTK: * GOLIBTest_4.cs: fps in pgbar * test4.goml: tests * CompilerServices.cs: check null src value --- src/CompilerServices/CompilerServices.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/CompilerServices') 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; -- cgit v1.3.1-4-g156e