From 5ca6f9af9aac0ebec7283dc1b269bab397e21876 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 30 Dec 2018 08:31:40 +0100 Subject: [PATCH] - added missing null pointer check to SBarInfo's inventory bar drawer. --- src/g_statusbar/sbarinfo_commands.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/g_statusbar/sbarinfo_commands.cpp b/src/g_statusbar/sbarinfo_commands.cpp index 6094f82ea..e6393ff27 100644 --- a/src/g_statusbar/sbarinfo_commands.cpp +++ b/src/g_statusbar/sbarinfo_commands.cpp @@ -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;