From 5f5e0e7aaf694f27ca8891e2e3e03c8bd72f8972 Mon Sep 17 00:00:00 2001 From: Fabian Greffrath Date: Thu, 9 Jan 2020 17:36:46 +0100 Subject: [PATCH] fix crash when loading maps without REJECT table Fixes #18 --- Source/p_sight.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Source/p_sight.c b/Source/p_sight.c index 06e87d9a..a75fd280 100644 --- a/Source/p_sight.c +++ b/Source/p_sight.c @@ -224,8 +224,12 @@ boolean P_CheckSight(mobj_t *t1, mobj_t *t2) // // Check in REJECT table. + // [FG] fix crash when loading maps without REJECT table + if (rejectmatrix) + { if (rejectmatrix[pnum>>3] & (1 << (pnum&7))) // can't possibly be connected return false; + } // killough 4/19/98: make fake floors and ceilings block monster view if ((s1->heightsec != -1 &&