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

Added interface NULL check in BfBaseClassWalker

This commit is contained in:
Brian Fiete 2024-10-13 10:10:08 -04:00
parent 4589e7ea0e
commit 01eb80c3d4

View file

@ -104,22 +104,26 @@ void BfBaseClassWalker::AddConstraints(BfType* srcType, BfGenericParamInstance*
if (genericParam->mTypeConstraint != NULL)
{
auto typeInst = genericParam->mTypeConstraint->ToTypeInstance();
if (typeInst != NULL)
{
if (typeInst->IsInterface())
AddInterfaces(srcType, typeInst->ToTypeInstance());
Entry entry(srcType, typeInst);
if ((typeInst != NULL) && (!mManualList.Contains(entry)))
if (!mManualList.Contains(entry))
mManualList.Add(entry);
}
}
for (auto typeInst : genericParam->mInterfaceConstraints)
{
if (typeInst->IsInterface())
AddInterfaces(srcType, typeInst->ToTypeInstance());
Entry entry(srcType, typeInst);
if ((typeInst != NULL) && (!mManualList.Contains(entry)))
mManualList.Add(entry);
if (typeInst != NULL)
{
if (typeInst->IsInterface())
AddInterfaces(srcType, typeInst->ToTypeInstance());
Entry entry(srcType, typeInst);
if (!mManualList.Contains(entry))
mManualList.Add(entry);
}
}
}