mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-15 17:11:24 +00:00
- 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:
parent
dc43bc5f0e
commit
3712a2cea5
1 changed files with 3 additions and 1 deletions
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue