summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-01-05 21:35:35 +0300
committerAndrei Karas <akaras@inbox.ru>2015-01-05 21:35:35 +0300
commitedc6ce053eafbaaa55fcf7728e449d9e458a1ddc (patch)
tree49362fd19396f3e1c39a33b22b4603cc3ed01a53 /src
parent6f9af529d0ac68ae8321ccff34268766a1b4c236 (diff)
downloadmanaplus-edc6ce053eafbaaa55fcf7728e449d9e458a1ddc.tar.gz
manaplus-edc6ce053eafbaaa55fcf7728e449d9e458a1ddc.tar.bz2
manaplus-edc6ce053eafbaaa55fcf7728e449d9e458a1ddc.tar.xz
manaplus-edc6ce053eafbaaa55fcf7728e449d9e458a1ddc.zip
Add missing check for null pointer.
Diffstat (limited to 'src')
-rw-r--r--src/resources/db/npcdb.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/resources/db/npcdb.cpp b/src/resources/db/npcdb.cpp
index 0db5bedc6..3048fb317 100644
--- a/src/resources/db/npcdb.cpp
+++ b/src/resources/db/npcdb.cpp
@@ -125,6 +125,9 @@ void NPCDB::loadXmlFile(const std::string &fileName)
}
else if (xmlNameEqual(spriteNode, "particlefx"))
{
+ if (!spriteNode->xmlChildrenNode)
+ continue;
+
display.particles.push_back(reinterpret_cast<const char*>(
spriteNode->xmlChildrenNode->content));
}