mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-26 14:01:45 +00:00
- fixed crash when loading a saved game with unknown class
During serialization, when map shutdown because of unknown class stored inside saved game may occur, level member is not assigned yet to already spawned thinkers
This commit is contained in:
parent
d9c619c800
commit
ffd464c26c
1 changed files with 4 additions and 1 deletions
|
@ -4819,7 +4819,10 @@ void AActor::OnDestroy ()
|
|||
// note that this differs from ThingSpawned in that you can actually override OnDestroy to avoid calling the hook.
|
||||
// but you can't really do that without utterly breaking the game, so it's ok.
|
||||
// note: if OnDestroy is ever made optional, E_WorldThingDestroyed should still be called for ANY thing.
|
||||
if (Level != nullptr)
|
||||
{
|
||||
Level->localEventManager->WorldThingDestroyed(this);
|
||||
}
|
||||
|
||||
DeleteAttachedLights();
|
||||
ClearRenderSectorList();
|
||||
|
|
Loading…
Reference in a new issue