From 1a0621cc445e819761b5a96fbb13afc9d696b949 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 23 May 2014 23:14:51 +0300 Subject: Fix possible memory leak. --- src/resources/mapreader.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') 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++) { -- cgit v1.2.3-70-g09d2