Browse Source

Operator extension fix

Brian Fiete 5 years ago
parent
commit
9650e10e88
1 changed files with 2 additions and 0 deletions
  1. 2 0
      IDEHelper/Compiler/BfModuleTypeUtils.cpp

+ 2 - 0
IDEHelper/Compiler/BfModuleTypeUtils.cpp

@@ -10682,6 +10682,8 @@ BfIRValue BfModule::CastToValue(BfAstNode* srcNode, BfTypedValue typedVal, BfTyp
 						else
 						else
 						{
 						{
 							auto methodInst = GetRawMethodInstanceAtIdx(checkInstance, operatorDef->mIdx);
 							auto methodInst = GetRawMethodInstanceAtIdx(checkInstance, operatorDef->mIdx);
+							if (methodInst == NULL)
+								continue;
 							if (methodInst->GetParamCount() != 1)
 							if (methodInst->GetParamCount() != 1)
 							{
 							{
 								AssertErrorState();
 								AssertErrorState();