mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-27 06:12:19 +00:00
- Fixed: NULL pointer dereference in DrawGem.
SVN r4186 (trunk)
This commit is contained in:
parent
98ea4d3d51
commit
18bf56d3d7
1 changed files with 1 additions and 1 deletions
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue