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

Fixed Go To Definition crash with no methodDecl

This commit is contained in:
Brian Fiete 2020-10-13 15:09:06 -07:00
parent 13ca09a464
commit 7349cdf50f

View file

@ -454,7 +454,7 @@ bool BfAutoComplete::IsAttribute(BfTypeInstance* typeInst)
}
void BfAutoComplete::AddMethod(BfTypeInstance* typeInstance, BfMethodDef* methodDef, BfMethodInstance* methodInstance, BfMethodDeclaration* methodDecl, const StringImpl& methodName, const StringImpl& filter)
{
{
String replaceName;
AutoCompleteEntry entry("method", methodName);
if (methodDecl != NULL)
@ -505,7 +505,7 @@ void BfAutoComplete::AddMethod(BfTypeInstance* typeInstance, BfMethodDef* method
}
}
if ((mResolveType == BfResolveType_GoToDefinition) && (mGetDefinitionNode == NULL) && (methodDecl->mNameNode != NULL))
if ((mResolveType == BfResolveType_GoToDefinition) && (mGetDefinitionNode == NULL) && (methodDecl != NULL) && (methodDecl->mNameNode != NULL))
SetDefinitionLocation(methodDecl->mNameNode);
}
}