From 6414a4ce786e8bb2b1939f7ceeca40e0d0d26639 Mon Sep 17 00:00:00 2001 From: Mitchell Richters Date: Tue, 4 Jan 2022 22:43:58 +1100 Subject: [PATCH] - Duke: Add nullptr check to `footprints()` code. --- source/games/duke/src/player.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/games/duke/src/player.cpp b/source/games/duke/src/player.cpp index ca14255d2..142043213 100644 --- a/source/games/duke/src/player.cpp +++ b/source/games/duke/src/player.cpp @@ -497,7 +497,7 @@ void footprints(int snum) auto actor = p->GetActor(); if (p->footprintcount > 0 && p->on_ground) - if ((p->cursector->floorstat & CSTAT_SECTOR_SLOPE) != 2) + if (p->insector() && (p->cursector->floorstat & CSTAT_SECTOR_SLOPE) != 2) { int j = -1; DukeSectIterator it(actor->sector());