From 30f2ac1e89e30b1e8367704bfca0932f5eaa3fd8 Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Mon, 14 Oct 2019 13:01:13 +0300 Subject: [PATCH] - fixed crash with DMSS_INFLICTORDMGTYPE flag and no inflictor https://forum.zdoom.org/viewtopic.php?t=66110 --- src/playsim/p_actionfunctions.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/playsim/p_actionfunctions.cpp b/src/playsim/p_actionfunctions.cpp index ccc1a104ee..d47053198c 100644 --- a/src/playsim/p_actionfunctions.cpp +++ b/src/playsim/p_actionfunctions.cpp @@ -3810,7 +3810,7 @@ static void DoDamage(AActor *dmgtarget, AActor *inflictor, AActor *source, int a if (amount > 0) { //Should wind up passing them through just fine. - if (flags & DMSS_INFLICTORDMGTYPE) + if (inflictor && (flags & DMSS_INFLICTORDMGTYPE)) DamageType = inflictor->DamageType; P_DamageMobj(dmgtarget, inflictor, source, amount, DamageType, dmgFlags);