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

https://forum.zdoom.org/viewtopic.php?t=60815
(cherry picked from commit 7009755c52)
This commit is contained in:
alexey.lysiuk 2018-06-05 11:06:31 +03:00 committed by drfrag666
parent dc43bc5f0e
commit 3712a2cea5

View file

@ -719,7 +719,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();
}