1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-09 03:52:19 +02:00

Null invoke check on deleted type

This commit is contained in:
Brian Fiete 2025-03-05 14:59:50 -08:00
parent 445fc0e982
commit e47ce74d25

View file

@ -10594,6 +10594,11 @@ BfTypedValue BfExprEvaluator::MatchMethod(BfAstNode* targetSrc, BfMethodBoundExp
((typeConstraint->IsDelegate()) || (typeConstraint->IsFunction()))) ((typeConstraint->IsDelegate()) || (typeConstraint->IsFunction())))
{ {
BfMethodInstance* invokeMethodInstance = mModule->GetRawMethodInstanceAtIdx(typeConstraint->ToTypeInstance(), 0, "Invoke"); BfMethodInstance* invokeMethodInstance = mModule->GetRawMethodInstanceAtIdx(typeConstraint->ToTypeInstance(), 0, "Invoke");
if (invokeMethodInstance == NULL)
{
mModule->InternalError("Get Invoke failed", targetSrc);
return BfTypedValue();
}
methodDef = invokeMethodInstance->mMethodDef; methodDef = invokeMethodInstance->mMethodDef;
methodMatcher.mBestMethodInstance = invokeMethodInstance; methodMatcher.mBestMethodInstance = invokeMethodInstance;