From 30d7e94ecefdf2f061909869f7b3a090d3cbd594 Mon Sep 17 00:00:00 2001 From: James R Date: Wed, 17 Jan 2024 20:35:15 -0800 Subject: [PATCH] Fix rare Bubble Shield crash Just NULL-checking --- src/p_map.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/p_map.c b/src/p_map.c index b700a4b5e..6884ad2e3 100644 --- a/src/p_map.c +++ b/src/p_map.c @@ -1031,7 +1031,7 @@ static BlockItReturn_t PIT_CheckThing(mobj_t *thing) } // Bubble Shield reflect - if ((thing->type == MT_BUBBLESHIELD && thing->target->player && thing->target->player->bubbleblowup) + if ((thing->type == MT_BUBBLESHIELD && !P_MobjWasRemoved(thing->target) && thing->target->player && thing->target->player->bubbleblowup) || (thing->player && thing->player->bubbleblowup)) { // see if it went over / under @@ -1053,7 +1053,7 @@ static BlockItReturn_t PIT_CheckThing(mobj_t *thing) return BMIT_CONTINUE; } } - else if ((tm.thing->type == MT_BUBBLESHIELD && tm.thing->target->player && tm.thing->target->player->bubbleblowup) + else if ((tm.thing->type == MT_BUBBLESHIELD && !P_MobjWasRemoved(tm.thing->target) && tm.thing->target->player && tm.thing->target->player->bubbleblowup) || (tm.thing->player && tm.thing->player->bubbleblowup)) { // see if it went over / under