- fixed crash with DMSS_INFLICTORDMGTYPE flag and no inflictor

https://forum.zdoom.org/viewtopic.php?t=66110
This commit is contained in:
alexey.lysiuk 2019-10-14 13:01:13 +03:00
parent f866ade4f1
commit 30f2ac1e89

View file

@ -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);