summaryrefslogtreecommitdiff
path: root/src/resources
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-05-23 23:14:51 +0300
committerAndrei Karas <akaras@inbox.ru>2014-05-23 23:14:51 +0300
commit1a0621cc445e819761b5a96fbb13afc9d696b949 (patch)
treeef0230aa67ff2c79a16ff18f9181afb1982d4199 /src/resources
parent906332df8779bca71641c6bcdc84d04a1de6d2eb (diff)
downloadplus-1a0621cc445e819761b5a96fbb13afc9d696b949.tar.gz
plus-1a0621cc445e819761b5a96fbb13afc9d696b949.tar.bz2
plus-1a0621cc445e819761b5a96fbb13afc9d696b949.tar.xz
plus-1a0621cc445e819761b5a96fbb13afc9d696b949.zip
Fix possible memory leak.
Diffstat (limited to 'src/resources')
-rw-r--r--src/resources/mapreader.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/resources/mapreader.cpp b/src/resources/mapreader.cpp
index 3a9a384bd..9e6422c58 100644
--- a/src/resources/mapreader.cpp
+++ b/src/resources/mapreader.cpp
@@ -973,7 +973,10 @@ Tileset *MapReader::readTileset(XmlNodePtr node,
// create animation
if (!set || !config.getBoolValue("playMapAnimations"))
+ {
+ delete ani;
continue;
+ }
for (int i = 0; ; i++)
{