- Fixed: NULL pointer dereference in DrawGem.

SVN r4186 (trunk)
This commit is contained in:
Braden Obrzut 2013-03-18 21:56:15 +00:00
parent 98ea4d3d51
commit 18bf56d3d7
1 changed files with 1 additions and 1 deletions

View File

@ -3046,7 +3046,7 @@ class CommandDrawGem : public SBarInfoCommand
}
void Tick(const SBarInfoMainBlock *block, const DSBarInfo *statusBar, bool hudChanged)
{
goalValue = armor ? statusBar->armor->Amount : statusBar->CPlayer->mo->health;
goalValue = armor ? (statusBar->armor ? statusBar->armor->Amount : 0) : statusBar->CPlayer->mo->health;
int max = armor ? 100 : statusBar->CPlayer->mo->GetMaxHealth() + statusBar->CPlayer->mo->stamina;
if(max != 0 && goalValue > 0)
{