Skip to content

Commit

Permalink
Fixed crash checking generic args for local method
Browse files Browse the repository at this point in the history
  • Loading branch information
bfiete committed Dec 8, 2020
1 parent 34dcd47 commit 3c45db1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion IDEHelper/Compiler/BfExprEvaluator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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];
}
Expand Down

0 comments on commit 3c45db1

Please sign in to comment.