- added missing null pointer check to SBarInfo's inventory bar drawer.

This commit is contained in:
Christoph Oelckers 2018-12-30 08:31:40 +01:00
parent 65b01bd16d
commit 5ca6f9af9a

View file

@ -2157,7 +2157,7 @@ class CommandDrawInventoryBar : public SBarInfoCommand
statusBar->DrawGraphic(statusBar->Images[statusBar->invBarOffset + imgARTIBOX], x + (!vertical ? (i*spacing) : 0), y + (vertical ? (i*spacing) : 0), block->XOffset(), block->YOffset(), bgalpha, block->FullScreenOffsets());
// Is there something to the left?
if (!noArrows && PrevInv(statusBar->CPlayer->mo->InvFirst))
if (!noArrows && statusBar->CPlayer->mo->InvFirst && PrevInv(statusBar->CPlayer->mo->InvFirst))
{
int offset = (style != STYLE_Strife ? (style != STYLE_HexenStrict ? -12 : -10) : 14);
int yOffset = style != STYLE_HexenStrict ? 0 : -1;