Skip to content

Commit

Permalink
Heretic: Fixed potential segfault
Browse files Browse the repository at this point in the history
Not checking for a null player mobj.
  • Loading branch information
skyjake committed Aug 2, 2011
1 parent 0e746d2 commit 6f4eaa9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions doomsday/plugins/jheretic/src/p_inter.c
Expand Up @@ -1116,6 +1116,8 @@ void P_AutoUseHealth(player_t* player, int saveHealth)
int normalCount = P_InventoryCount(plrnum, IIT_HEALTH);
int superCount = P_InventoryCount(plrnum, IIT_SUPERHEALTH);

if(!player->plr->mo) return;

//// \todo Do this in the inventory code?
if(gameSkill == SM_BABY && normalCount * 25 >= saveHealth)
{
Expand Down

0 comments on commit 6f4eaa9

Please sign in to comment.