From b4cd8029339cac3c577b67bd161b4dd3ab4f1530 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 12 May 2011 22:18:24 +0300 Subject: Add missing checks to actorsprite.cpp --- src/actorsprite.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/actorsprite.cpp') diff --git a/src/actorsprite.cpp b/src/actorsprite.cpp index aa288e377..90536e364 100644 --- a/src/actorsprite.cpp +++ b/src/actorsprite.cpp @@ -242,6 +242,9 @@ void ActorSprite::setStatusEffectBlock(int offset, Uint16 newEffects) void ActorSprite::internalTriggerEffect(int effectId, bool sfx, bool gfx) { + if (!particleEngine) + return; + if (player_node) { logger->log("Special effect #%d on %s", effectId, @@ -315,6 +318,8 @@ void ActorSprite::setupSpriteDisplay(const SpriteDisplay &display, for (it = display.sprites.begin(), it_end = display.sprites.end(); it != it_end; ++it) { + if (!*it) + continue; std::string file = "graphics/sprites/" + combineDye2((*it)->sprite, color); -- cgit v1.2.3-70-g09d2