소스 검색

Fixed crash when attempting invocation in const context

Brian Fiete 5 년 전
부모
커밋
81af04a1ce
1개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  1. 3 1
      IDEHelper/Compiler/BfExprEvaluator.cpp

+ 3 - 1
IDEHelper/Compiler/BfExprEvaluator.cpp

@@ -5442,11 +5442,13 @@ BfTypedValue BfExprEvaluator::CreateCall(BfAstNode* targetSrc, const BfTypedValu
 
 		if ((argValue) && (arg != NULL))
 		{	
-			//
+			if (mModule->mCurMethodState != NULL)
 			{
 				SetAndRestoreValue<BfScopeData*> prevScopeData(mModule->mCurMethodState->mOverrideScope, boxScopeData);
 				argValue = mModule->Cast(arg, argValue, wantType);
 			}
+			else
+				argValue = mModule->Cast(arg, argValue, wantType);
 
 			if (!argValue)
 			{