From c9c649d3f8dd37e7759dd939376f3d3145ae6c46 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Tue, 3 Nov 2020 07:05:51 +0100 Subject: [PATCH] - crash fix with null pointer. --- source/games/duke/src/dukeactor.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/games/duke/src/dukeactor.h b/source/games/duke/src/dukeactor.h index d00c8e5da..d95f62300 100644 --- a/source/games/duke/src/dukeactor.h +++ b/source/games/duke/src/dukeactor.h @@ -303,7 +303,7 @@ inline int hitasprite(DDukeActor* actor, DDukeActor** hit) { short m; int dist = hitasprite(actor->GetIndex(), &m); - if (m >= 0 && hit) *hit = &hittype[m]; + if (hit) *hit = m >= 0? &hittype[m] : nullptr; else *hit = nullptr; return dist; }