summaryrefslogtreecommitdiff
path: root/src/being.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/being.cpp')
-rw-r--r--src/being.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/being.cpp b/src/being.cpp
index ab3860a0..a755ffb8 100644
--- a/src/being.cpp
+++ b/src/being.cpp
@@ -483,9 +483,12 @@ void Being::handleAttack(Being *victim, int damage, AttackType type)
victim->controlParticle(p);
Particle *p2 = particleEngine->addEffect("graphics/particles/arrow.particle.xml", mPx, mPy);
- p2->setLifetime(900);
- p2->setDestination(p, 7, 0);
- p2->setDieDistance(8);
+ if (p2)
+ {
+ p2->setLifetime(900);
+ p2->setDestination(p, 7, 0);
+ p2->setDieDistance(8);
+ }
}
}
mFrame = 0;