diff --git a/src/p_acs.cpp b/src/p_acs.cpp index f9744884c..663d316dc 100644 --- a/src/p_acs.cpp +++ b/src/p_acs.cpp @@ -5406,7 +5406,7 @@ int DLevelScript::CallFunction(int argCount, int funcIndex, SDWORD *args, const if (args[0] == 0) { AActor *puff = P_LineAttack(activator, angle, range, pitch, damage, damagetype, pufftype, fhflags); - if (pufftid != 0) + if (puff != NULL && pufftid != 0) { puff->tid = pufftid; puff->AddToHash(); @@ -5420,7 +5420,7 @@ int DLevelScript::CallFunction(int argCount, int funcIndex, SDWORD *args, const while ((source = it.Next()) != NULL) { AActor *puff = P_LineAttack(source, angle, range, pitch, damage, damagetype, pufftype, fhflags); - if (pufftid != 0) + if (puff != NULL && pufftid != 0) { puff->tid = pufftid; puff->AddToHash();