浏览代码

Fixed crash checking generic args for local method

Brian Fiete 4 年之前
父节点
当前提交
3c45db1976
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      IDEHelper/Compiler/BfExprEvaluator.cpp

+ 1 - 1
IDEHelper/Compiler/BfExprEvaluator.cpp

@@ -13576,7 +13576,7 @@ BfModuleMethodInstance BfExprEvaluator::GetSelectedMethod(BfAstNode* targetSrc,
 			{				
 				// If the root method is generic and we need that param then use that...
 				auto rootMethodInstance = rootMethodState->mMethodInstance;
-				if (checkGenericIdx < rootMethodInstance->mMethodInfoEx->mMethodGenericArguments.size())
+				if ((rootMethodInstance->mMethodInfoEx != NULL) && (checkGenericIdx < rootMethodInstance->mMethodInfoEx->mMethodGenericArguments.size()))
 				{
 					genericArg = rootMethodInstance->mMethodInfoEx->mMethodGenericArguments[checkGenericIdx];
 				}