1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-10 12:32:20 +02:00

Fixed a crash on failed delegate bind

This commit is contained in:
Brian Fiete 2020-05-15 08:53:10 -07:00
parent 0113ce7115
commit 66216ce5d9

View file

@ -10415,13 +10415,13 @@ BfLambdaInstance* BfExprEvaluator::GetLambdaInstance(BfLambdaBindExpression* lam
}
SizedArray<BfIRType, 3> newTypes;
if (invokeMethodInstance->HasStructRet())
if ((invokeMethodInstance != NULL) && (invokeMethodInstance->HasStructRet()))
newTypes.push_back(origParamTypes[0]);
if (!methodDef->mIsStatic)
newTypes.push_back(mModule->mBfIRBuilder->MapType(useTypeInstance));
int paramStartIdx = 0;
if (invokeMethodInstance->HasStructRet())
if ((invokeMethodInstance != NULL) && (invokeMethodInstance->HasStructRet()))
paramStartIdx++;
if (!methodDef->mIsStatic)
paramStartIdx++;