- fix crash on dying when player class has no death states

https://forum.zdoom.org/viewtopic.php?t=60815
This commit is contained in:
alexey.lysiuk 2018-06-05 11:06:31 +03:00
parent fae514f30d
commit 7009755c52

View file

@ -714,7 +714,9 @@ void AActor::Die (AActor *source, AActor *inflictor, int dmgflags)
tics = 1;
}
}
else
// The following condition is needed to avoid crash when player class has no death states
// Instance of player pawn will be garbage collected on reloading of level
else if (player == nullptr)
{
Destroy();
}