summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-07-25 03:45:05 +0300
committerAndrei Karas <akaras@inbox.ru>2011-07-25 03:45:05 +0300
commit294fbc83d50a19fd7c87b54a910f5304ec3f4a7d (patch)
tree114981054d7aed1b0eda29f29b7d3d450b48018d /src
parenta4252ba2050b16a53247335cdddd7aa13a532239 (diff)
downloadplus-294fbc83d50a19fd7c87b54a910f5304ec3f4a7d.tar.gz
plus-294fbc83d50a19fd7c87b54a910f5304ec3f4a7d.tar.bz2
plus-294fbc83d50a19fd7c87b54a910f5304ec3f4a7d.tar.xz
plus-294fbc83d50a19fd7c87b54a910f5304ec3f4a7d.zip
Add check for incorrect remove sprite configuration.
Diffstat (limited to 'src')
-rw-r--r--src/resources/itemdb.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/resources/itemdb.cpp b/src/resources/itemdb.cpp
index bee988510..22728525c 100644
--- a/src/resources/itemdb.cpp
+++ b/src/resources/itemdb.cpp
@@ -617,6 +617,9 @@ void loadReplaceSprite(ItemInfo *itemInfo, xmlNodePtr replaceNode)
std::map<int, int> *mapList = itemInfo->addReplaceSprite(
parseSpriteName(removeSprite), direction);
+ if (!mapList)
+ return;
+
itemInfo->setRemoveSprites();
for_each_xml_child_node(itemNode, replaceNode)