mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-22 20:21:26 +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.
|
||||
Level->localEventManager->WorldThingDestroyed(this);
|
||||
if (Level != nullptr)
|
||||
{
|
||||
Level->localEventManager->WorldThingDestroyed(this);
|
||||
}
|
||||
|
||||
DeleteAttachedLights();
|
||||
ClearRenderSectorList();
|
||||
|
|
Loading…
Reference in a new issue