mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 04:22:20 +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,8 +1974,18 @@ void BfContext::DeleteType(BfType* type, bool deferDepRebuilds)
|
|||
|
||||
for (auto dependentType : rebuildTypeQueue)
|
||||
{
|
||||
auto dependentTypeInst = dependentType->ToTypeInstance();
|
||||
|
||||
// This guards against recompile loops
|
||||
if (CanRebuild(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