summaryrefslogtreecommitdiff
path: root/src/particle
diff options
context:
space:
mode:
Diffstat (limited to 'src/particle')
-rw-r--r--src/particle/particle.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/particle/particle.cpp b/src/particle/particle.cpp
index 08131cd23..f270dcc79 100644
--- a/src/particle/particle.cpp
+++ b/src/particle/particle.cpp
@@ -330,7 +330,7 @@ Particle *Particle::addEffect(const std::string &particleEffectFile,
else if ((node = XML::findFirstChildByName(effectChildNode, "image")))
{
std::string imageSrc;
- if (node->xmlChildrenNode)
+ if (node && node->xmlChildrenNode)
{
imageSrc = reinterpret_cast<const char*>(
node->xmlChildrenNode->content);
@@ -380,7 +380,7 @@ Particle *Particle::addEffect(const std::string &particleEffectFile,
else if (xmlNameEqual(emitterNode, "deatheffect"))
{
std::string deathEffect;
- if (node->xmlChildrenNode)
+ if (node && node->xmlChildrenNode)
{
deathEffect = reinterpret_cast<const char*>(
emitterNode->xmlChildrenNode->content);