1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-29 21:05:59 +02:00

Base type null check fix

This commit is contained in:
Brian Fiete 2025-06-12 17:10:27 +02:00
parent 7fe6082686
commit 764c454261

View file

@ -2892,6 +2892,8 @@ void BfAutoComplete::AddCtorPassthroughs()
declMethods.Add(methodInst); declMethods.Add(methodInst);
} }
if (baseType != NULL)
{
for (auto methodDef : baseType->mTypeDef->mMethods) for (auto methodDef : baseType->mTypeDef->mMethods)
{ {
if (methodDef->mShow != BfShow_Show) if (methodDef->mShow != BfShow_Show)
@ -2937,6 +2939,7 @@ void BfAutoComplete::AddCtorPassthroughs()
totalInsertString += insertString.Substring(tabPos + 1); totalInsertString += insertString.Substring(tabPos + 1);
} }
} }
}
if ((!totalInsertString.IsEmpty()) && (mEntriesSet.GetCount() >= 2)) if ((!totalInsertString.IsEmpty()) && (mEntriesSet.GetCount() >= 2))
{ {
@ -4087,7 +4090,7 @@ void BfAutoComplete::FixitAddConstructor(BfTypeInstance *typeInstance)
{ {
auto baseType = typeInstance->mBaseType; auto baseType = typeInstance->mBaseType;
auto parser = typeInstance->mTypeDef->GetDefinition()->mSource->ToParser(); auto parser = typeInstance->mTypeDef->GetDefinition()->mSource->ToParser();
if (parser != NULL) if ((parser != NULL) && (baseType != NULL))
{ {
for (auto methodDef : baseType->mTypeDef->mMethods) for (auto methodDef : baseType->mTypeDef->mMethods)
{ {