mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-13 22:04:09 +02:00
Fixed midcompile rebuild for deleted dependent types
This commit is contained in:
parent
a356186514
commit
04f1802303
1 changed files with 10 additions and 0 deletions
|
@ -1974,9 +1974,19 @@ void BfContext::DeleteType(BfType* type, bool deferDepRebuilds)
|
||||||
|
|
||||||
for (auto dependentType : rebuildTypeQueue)
|
for (auto dependentType : rebuildTypeQueue)
|
||||||
{
|
{
|
||||||
|
auto dependentTypeInst = dependentType->ToTypeInstance();
|
||||||
|
|
||||||
|
// This guards against recompile loops
|
||||||
if (CanRebuild(dependentType))
|
if (CanRebuild(dependentType))
|
||||||
|
{
|
||||||
RebuildType(dependentType);
|
RebuildType(dependentType);
|
||||||
}
|
}
|
||||||
|
else if (dependentTypeInst != NULL)
|
||||||
|
{
|
||||||
|
// This keeps us from crashing from accessing deleted types on subsequent compiles
|
||||||
|
mFailTypes.TryAdd(dependentTypeInst, BfFailKind_Normal);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue