From 12a0f587a37d45c2bed6dc271309c10975249a11 Mon Sep 17 00:00:00 2001 From: Mitch Richters Date: Sun, 5 Dec 2021 17:30:11 +1100 Subject: [PATCH] - SW: Add nullptr check inside `WarpSectorInfo()` to prevent crashes while noclipping through level. --- source/games/sw/src/warp.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/games/sw/src/warp.cpp b/source/games/sw/src/warp.cpp index 362295b86..e24b21e94 100644 --- a/source/games/sw/src/warp.cpp +++ b/source/games/sw/src/warp.cpp @@ -210,7 +210,7 @@ bool WarpSectorInfo(sectortype* sect, DSWActor** sp_warp) { *sp_warp = nullptr; - if (!TEST(sect->extra, SECTFX_WARP_SECTOR)) + if (sect && !TEST(sect->extra, SECTFX_WARP_SECTOR)) return false; SWStatIterator it(STAT_WARP);