summaryrefslogtreecommitdiff
path: root/src/resources/db/horsedb.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-07-21 00:47:44 +0300
committerAndrei Karas <akaras@inbox.ru>2015-07-21 00:47:44 +0300
commitfffbd86a1014ad169ed2d68ea58cdddf346faa14 (patch)
tree713c96fcf7421ca87f638d312e752179281cb8fe /src/resources/db/horsedb.cpp
parent1941b81a5a278f26a5d7e1f91903ab04c92e2cd1 (diff)
downloadmanaverse-fffbd86a1014ad169ed2d68ea58cdddf346faa14.tar.gz
manaverse-fffbd86a1014ad169ed2d68ea58cdddf346faa14.tar.bz2
manaverse-fffbd86a1014ad169ed2d68ea58cdddf346faa14.tar.xz
manaverse-fffbd86a1014ad169ed2d68ea58cdddf346faa14.zip
Add missing checks and non null attributes.
Diffstat (limited to 'src/resources/db/horsedb.cpp')
-rw-r--r--src/resources/db/horsedb.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/resources/db/horsedb.cpp b/src/resources/db/horsedb.cpp
index 11fd57d36..a3daf76cc 100644
--- a/src/resources/db/horsedb.cpp
+++ b/src/resources/db/horsedb.cpp
@@ -97,6 +97,8 @@ void HorseDB::loadXmlFile(const std::string &fileName)
else
currentInfo = new HorseInfo;
+ if (!currentInfo)
+ continue;
currentInfo->offsetX = XML::getProperty(horseNode, "offsetX", 0);
currentInfo->offsetY = XML::getProperty(horseNode, "offsetY", 0);