summaryrefslogtreecommitdiff
path: root/src/resources/mapreader.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/resources/mapreader.cpp')
-rw-r--r--src/resources/mapreader.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/resources/mapreader.cpp b/src/resources/mapreader.cpp
index cf18e4bb..11deacbf 100644
--- a/src/resources/mapreader.cpp
+++ b/src/resources/mapreader.cpp
@@ -76,7 +76,7 @@ Map *MapReader::readMap(const std::string &filename)
logger.log("Warning: Not a map file (%s)!", filename.c_str());
return NULL;
}
-
+
return readMap(node, filename);
xmlFreeDoc(doc);
} else {
@@ -89,7 +89,7 @@ Map *MapReader::readMap(const std::string &filename)
Map* MapReader::readMap(xmlNodePtr node, const std::string &path)
{
xmlChar *prop;
-
+
// Take the filename off the path
std::string pathDir = path.substr(0, path.rfind("/") + 1);
@@ -121,6 +121,10 @@ Map* MapReader::readMap(xmlNodePtr node, const std::string &path)
}
}
+ // Clean up tilesets
+ // TODO: Dereference them somewhere
+ tilesets.clear();
+
return map;
}