mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-14 22:34:09 +02:00
Added interface NULL check in BfBaseClassWalker
This commit is contained in:
parent
4589e7ea0e
commit
01eb80c3d4
1 changed files with 10 additions and 6 deletions
|
@ -104,24 +104,28 @@ void BfBaseClassWalker::AddConstraints(BfType* srcType, BfGenericParamInstance*
|
||||||
if (genericParam->mTypeConstraint != NULL)
|
if (genericParam->mTypeConstraint != NULL)
|
||||||
{
|
{
|
||||||
auto typeInst = genericParam->mTypeConstraint->ToTypeInstance();
|
auto typeInst = genericParam->mTypeConstraint->ToTypeInstance();
|
||||||
|
if (typeInst != NULL)
|
||||||
{
|
{
|
||||||
if (typeInst->IsInterface())
|
if (typeInst->IsInterface())
|
||||||
AddInterfaces(srcType, typeInst->ToTypeInstance());
|
AddInterfaces(srcType, typeInst->ToTypeInstance());
|
||||||
Entry entry(srcType, typeInst);
|
Entry entry(srcType, typeInst);
|
||||||
if ((typeInst != NULL) && (!mManualList.Contains(entry)))
|
if (!mManualList.Contains(entry))
|
||||||
mManualList.Add(entry);
|
mManualList.Add(entry);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (auto typeInst : genericParam->mInterfaceConstraints)
|
for (auto typeInst : genericParam->mInterfaceConstraints)
|
||||||
|
{
|
||||||
|
if (typeInst != NULL)
|
||||||
{
|
{
|
||||||
if (typeInst->IsInterface())
|
if (typeInst->IsInterface())
|
||||||
AddInterfaces(srcType, typeInst->ToTypeInstance());
|
AddInterfaces(srcType, typeInst->ToTypeInstance());
|
||||||
Entry entry(srcType, typeInst);
|
Entry entry(srcType, typeInst);
|
||||||
if ((typeInst != NULL) && (!mManualList.Contains(entry)))
|
if (!mManualList.Contains(entry))
|
||||||
mManualList.Add(entry);
|
mManualList.Add(entry);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void BfBaseClassWalker::AddInterfaces(BfType* srcType, BfTypeInstance* typeInst)
|
void BfBaseClassWalker::AddInterfaces(BfType* srcType, BfTypeInstance* typeInst)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue