summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-05-12 22:18:24 +0300
committerAndrei Karas <akaras@inbox.ru>2011-05-12 22:18:24 +0300
commitb4cd8029339cac3c577b67bd161b4dd3ab4f1530 (patch)
tree33a2bccfcd957e11cdb73b01e456949fd2aee34e /src
parent8edbf5c3879850bb8546a1cb96ba713ef35c1d41 (diff)
downloadplus-b4cd8029339cac3c577b67bd161b4dd3ab4f1530.tar.gz
plus-b4cd8029339cac3c577b67bd161b4dd3ab4f1530.tar.bz2
plus-b4cd8029339cac3c577b67bd161b4dd3ab4f1530.tar.xz
plus-b4cd8029339cac3c577b67bd161b4dd3ab4f1530.zip
Add missing checks to actorsprite.cpp
Diffstat (limited to 'src')
-rw-r--r--src/actorsprite.cpp5
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);