- better add a NULL pointer check here.

This commit is contained in:
Christoph Oelckers 2016-01-05 11:07:59 +01:00
parent d7501a1414
commit b2f860d7ae

View file

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