mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-14 14:24:10 +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,22 +104,26 @@ 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->IsInterface())
|
if (typeInst != NULL)
|
||||||
AddInterfaces(srcType, typeInst->ToTypeInstance());
|
{
|
||||||
Entry entry(srcType, typeInst);
|
if (typeInst->IsInterface())
|
||||||
if ((typeInst != NULL) && (!mManualList.Contains(entry)))
|
AddInterfaces(srcType, typeInst->ToTypeInstance());
|
||||||
mManualList.Add(entry);
|
Entry entry(srcType, typeInst);
|
||||||
|
if (!mManualList.Contains(entry))
|
||||||
|
mManualList.Add(entry);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue