- try to keep the engine stable for as long as possible if a VM exception occurs in OnDestroy while running a cleanup.
This will still crash, but run long enough for the exception message to be visible.
This commit is contained in:
parent
936e89e3d4
commit
b6c5232fea
6 changed files with 12 additions and 11 deletions
|
|
@ -271,7 +271,7 @@ void FThinkerCollection::RunThinkers(FLevelLocals *Level)
|
|||
//
|
||||
//==========================================================================
|
||||
|
||||
void FThinkerCollection::DestroyAllThinkers()
|
||||
void FThinkerCollection::DestroyAllThinkers(bool fullgc)
|
||||
{
|
||||
int i;
|
||||
bool error = false;
|
||||
|
|
@ -285,11 +285,12 @@ void FThinkerCollection::DestroyAllThinkers()
|
|||
}
|
||||
}
|
||||
error |= Thinkers[MAX_STATNUM + 1].DoDestroyThinkers();
|
||||
GC::FullGC();
|
||||
if (fullgc) GC::FullGC();
|
||||
if (error)
|
||||
{
|
||||
ClearGlobalVMStack();
|
||||
I_Error("DestroyAllThinkers failed");
|
||||
if (fullgc) I_Error("DestroyAllThinkers failed");
|
||||
else I_FatalError("DestroyAllThinkers failed");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue