From b2f860d7ae6842ab0bdf168f6b2bb4a03bf5e9b0 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Tue, 5 Jan 2016 11:07:59 +0100 Subject: [PATCH] - better add a NULL pointer check here. --- src/p_acs.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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();