diff options
author | Andrei Karas <akaras@inbox.ru> | 2011-05-12 22:18:24 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-05-12 22:18:24 +0300 |
commit | b4cd8029339cac3c577b67bd161b4dd3ab4f1530 (patch) | |
tree | 33a2bccfcd957e11cdb73b01e456949fd2aee34e /src | |
parent | 8edbf5c3879850bb8546a1cb96ba713ef35c1d41 (diff) | |
download | manaplus-b4cd8029339cac3c577b67bd161b4dd3ab4f1530.tar.gz manaplus-b4cd8029339cac3c577b67bd161b4dd3ab4f1530.tar.bz2 manaplus-b4cd8029339cac3c577b67bd161b4dd3ab4f1530.tar.xz manaplus-b4cd8029339cac3c577b67bd161b4dd3ab4f1530.zip |
Add missing checks to actorsprite.cpp
Diffstat (limited to 'src')
-rw-r--r-- | src/actorsprite.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
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); |