Handle when C# calls a script function with null as parameter

This commit is contained in:
Deukhoofd 2019-01-21 14:38:01 +01:00
parent b73982237c
commit 7f58db1955
No known key found for this signature in database
GPG Key ID: B4C087AC81641654
1 changed files with 6 additions and 1 deletions

View File

@ -46,7 +46,12 @@ namespace Upsilon.BaseTypes.ScriptFunction
{
var parameter = option.Parameters[index];
var parameterSymbol = ((UserDataVariableSymbol) parameter.VariableSymbol);
var parameterType = variables[index].GetType();
var v = variables[index];
if (v == null)
{
continue;
}
var parameterType = v.GetType();
if (parameterSymbol.BoundTypeDefinition != null)
{
var validSymbol =