- added NULL pointer checks to A_CheckStaff.

This commit is contained in:
Christoph Oelckers 2015-03-24 09:22:51 +01:00
parent e29b8b2094
commit 7b6d245444

View file

@ -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)
{