From 64c9ad73a76cd2e4a22d9f9555497ff785ca8daa Mon Sep 17 00:00:00 2001 From: Mitchell Richters Date: Mon, 2 Jan 2023 15:02:57 +1100 Subject: [PATCH] - Blood: Fix some nullptr issues in `checkHit()` and `checkFloorHit()`. * Fixes #834. --- source/games/blood/src/actor.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/games/blood/src/actor.cpp b/source/games/blood/src/actor.cpp index 9bfd280a6..0dfd2a10d 100644 --- a/source/games/blood/src/actor.cpp +++ b/source/games/blood/src/actor.cpp @@ -4229,7 +4229,7 @@ static void checkHit(DBloodActor* actor) case kHitWall: break; case kHitSprite: - if (coll.actor()->hasX()) + if (coll.actor() && coll.actor()->hasX()) { auto actor2 = coll.actor(); @@ -4302,7 +4302,7 @@ static void checkFloorHit(DBloodActor* actor) actTouchFloor(actor, coll.hitSector); break; case kHitSprite: - if (coll.actor()->hasX()) + if (coll.actor() && coll.actor()->hasX()) { auto actor2 = coll.actor();