Permalink
Browse files

Handle null strings returned from CLR using sorear++'s suggestion.

  • Loading branch information...
1 parent e52d6c3 commit a6600997b13d6f6002e491c8463b38cdeb788450 @colomon colomon committed Jun 12, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/NieczaCLR.cs
View
@@ -788,7 +788,7 @@ public class CLRWrapperProvider {
if (cty == typeof(bool))
return Kernel.BoxAnyMO((bool)ret, Kernel.BoolMO);
if (cty == typeof(string))
- return Kernel.BoxAnyMO((string)ret, Kernel.StrMO);
+ return ret == null ? Kernel.StrMO.typeObj : Kernel.BoxAnyMO((string)ret, Kernel.StrMO);
if (cty == typeof(Variable))
return (Variable)ret;
if (cty == typeof(P6any))

0 comments on commit a660099

Please sign in to comment.