فهرست منبع

Null invoke check on deleted type

Brian Fiete 6 ماه پیش
والد
کامیت
e47ce74d25
1فایلهای تغییر یافته به همراه5 افزوده شده و 0 حذف شده
  1. 5 0
      IDEHelper/Compiler/BfExprEvaluator.cpp

+ 5 - 0
IDEHelper/Compiler/BfExprEvaluator.cpp

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