Fix passing nil to CSharp functions not returning function
This commit is contained in:
parent
beac043995
commit
50f06f389a
|
@ -82,6 +82,11 @@ namespace Upsilon.BaseTypes.UserData
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (argumentType == typeof(ScriptNull))
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if (!matchParameter.ParameterType.IsAssignableFrom(argumentType))
|
if (!matchParameter.ParameterType.IsAssignableFrom(argumentType))
|
||||||
{
|
{
|
||||||
validMatch = false;
|
validMatch = false;
|
||||||
|
@ -144,6 +149,10 @@ namespace Upsilon.BaseTypes.UserData
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (value is ScriptNull)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
var isScriptTypeRequired = typeof(ScriptType).IsAssignableFrom(type);
|
var isScriptTypeRequired = typeof(ScriptType).IsAssignableFrom(type);
|
||||||
var isScriptType = value is ScriptType;
|
var isScriptType = value is ScriptType;
|
||||||
|
|
Loading…
Reference in New Issue