mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-24 13:01:47 +00:00
- added NULL pointer checks to A_CheckStaff.
This commit is contained in:
parent
e29b8b2094
commit
7b6d245444
1 changed files with 5 additions and 1 deletions
|
@ -83,7 +83,11 @@ DEFINE_ACTION_FUNCTION(AActor, A_CStaffCheck)
|
|||
{
|
||||
pmo->health = player->health = newLife;
|
||||
}
|
||||
P_SetPsprite (player, ps_weapon, weapon->FindState ("Drain"));
|
||||
if (weapon != NULL)
|
||||
{
|
||||
FState * newstate = weapon->FindState("Drain");
|
||||
if (newstate != NULL) P_SetPsprite(player, ps_weapon, newstate);
|
||||
}
|
||||
}
|
||||
if (weapon != NULL)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue