diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/being.cpp | 9 |
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; |