mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-11 15:21:51 +00:00
Fixed crash on exit caused by undefined class
Referenced but undefined optional class does not abort loading with fatal error For example, incorrect MorphProjectile's PlayerClass or MonsterClass caused crash during shutdown
This commit is contained in:
parent
1608e11f0d
commit
9a9c90a504
1 changed files with 1 additions and 1 deletions
|
@ -280,7 +280,7 @@ void PClass::StaticShutdown ()
|
|||
|
||||
// This must be done in two steps because the native classes are not ordered by inheritance,
|
||||
// so all meta data must be gone before deleting the actual class objects.
|
||||
for (auto cls : AllClasses) cls->DestroyMeta(cls->Meta);
|
||||
for (auto cls : AllClasses) if (cls->Meta != nullptr) cls->DestroyMeta(cls->Meta);
|
||||
for (auto cls : AllClasses) delete cls;
|
||||
// Unless something went wrong, anything left here should be class and type objects only, which do not own any scripts.
|
||||
bShutdown = true;
|
||||
|
|
Loading…
Reference in a new issue