summaryrefslogtreecommitdiff
path: root/src/resources/npcdb.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-03-16 14:28:45 +0200
committerAndrei Karas <akaras@inbox.ru>2011-03-16 14:28:45 +0200
commit59dc0bffc0f754de8daed29bce3a48e90ea6b4fb (patch)
tree7cd423679a60e25b29318d7a87f367729f8d5fdf /src/resources/npcdb.cpp
parentfbf665912933d10d9132b17802949149d9094fdd (diff)
downloadmanaplus-59dc0bffc0f754de8daed29bce3a48e90ea6b4fb.tar.gz
manaplus-59dc0bffc0f754de8daed29bce3a48e90ea6b4fb.tar.bz2
manaplus-59dc0bffc0f754de8daed29bce3a48e90ea6b4fb.tar.xz
manaplus-59dc0bffc0f754de8daed29bce3a48e90ea6b4fb.zip
Add checks and fix some code style.
Diffstat (limited to 'src/resources/npcdb.cpp')
-rw-r--r--src/resources/npcdb.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/resources/npcdb.cpp b/src/resources/npcdb.cpp
index f20654829..5a1ad9985 100644
--- a/src/resources/npcdb.cpp
+++ b/src/resources/npcdb.cpp
@@ -79,6 +79,9 @@ void NPCDB::load()
SpriteDisplay display;
for_each_xml_child_node(spriteNode, npcNode)
{
+ if (!spriteNode->xmlChildrenNode)
+ continue;
+
if (xmlStrEqual(spriteNode->name, BAD_CAST "sprite"))
{
SpriteReference *currentSprite = new SpriteReference;