diff options
author | Andrei Karas <akaras@inbox.ru> | 2011-03-16 14:28:45 +0200 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-03-16 14:28:45 +0200 |
commit | 59dc0bffc0f754de8daed29bce3a48e90ea6b4fb (patch) | |
tree | 7cd423679a60e25b29318d7a87f367729f8d5fdf /src/resources/monsterdb.cpp | |
parent | fbf665912933d10d9132b17802949149d9094fdd (diff) | |
download | manaverse-59dc0bffc0f754de8daed29bce3a48e90ea6b4fb.tar.gz manaverse-59dc0bffc0f754de8daed29bce3a48e90ea6b4fb.tar.bz2 manaverse-59dc0bffc0f754de8daed29bce3a48e90ea6b4fb.tar.xz manaverse-59dc0bffc0f754de8daed29bce3a48e90ea6b4fb.zip |
Add checks and fix some code style.
Diffstat (limited to 'src/resources/monsterdb.cpp')
-rw-r--r-- | src/resources/monsterdb.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/resources/monsterdb.cpp b/src/resources/monsterdb.cpp index 6ebbaedde..854450bfd 100644 --- a/src/resources/monsterdb.cpp +++ b/src/resources/monsterdb.cpp @@ -98,6 +98,9 @@ void MonsterDB::load() //iterate <sprite>s and <sound>s for_each_xml_child_node(spriteNode, monsterNode) { + if (!spriteNode->xmlChildrenNode) + continue; + if (xmlStrEqual(spriteNode->name, BAD_CAST "sprite")) { SpriteReference *currentSprite = new SpriteReference; |