From deef767c5d3a2c84ecd7a9de3e81dcc20176a28c 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 7fdd65a78..082e6b1cd 100644 --- a/source/games/blood/src/actor.cpp +++ b/source/games/blood/src/actor.cpp @@ -4230,7 +4230,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(); @@ -4303,7 +4303,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();