1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-10 20:42:21 +02:00

Fixed crash checking generic args for local method

This commit is contained in:
Brian Fiete 2020-12-08 13:51:48 -08:00
parent 34dcd47dd5
commit 3c45db1976

View file

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