From 27cc865af744bba535c7ce8c4c411902c07507a4 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Tue, 21 Jan 2020 22:03:04 +0100 Subject: [PATCH] - null checks in SW. --- source/sw/src/inv.cpp | 2 +- source/sw/src/track.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/source/sw/src/inv.cpp b/source/sw/src/inv.cpp index cfb7b9728..8750a54b0 100644 --- a/source/sw/src/inv.cpp +++ b/source/sw/src/inv.cpp @@ -127,7 +127,7 @@ void UpdateMiniBar(PLAYERp pp) #define MINI_BAR_INVENTORY_BOX_X 64 #define MINI_BAR_INVENTORY_BOX_Y MINI_BAR_Y - if (!PanelUpdateMode) + if (!PanelUpdateMode || !u) return; if (gs.BorderNum != BORDER_MINI_BAR) diff --git a/source/sw/src/track.cpp b/source/sw/src/track.cpp index 931104bac..08fb8e458 100644 --- a/source/sw/src/track.cpp +++ b/source/sw/src/track.cpp @@ -2988,7 +2988,7 @@ DoAutoTurretObject(SECTOR_OBJECTp sop) int dist; short i; - if (sop->max_damage != -9999 && sop->max_damage <= 0) + if ((sop->max_damage != -9999 && sop->max_damage <= 0) || !u) return;