summaryrefslogtreecommitdiff
path: root/src/resources/mapreader.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2005-04-18 21:56:06 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2005-04-18 21:56:06 +0000
commit7d8ea8914bc230d473f558116d932f26f2b5d055 (patch)
treebf77bf707beb6a70b69d76dad7f19c0a69654c5f /src/resources/mapreader.cpp
parent708384a6b1fca22c6352deb79e52422266dc307e (diff)
downloadmana-client-7d8ea8914bc230d473f558116d932f26f2b5d055.tar.gz
mana-client-7d8ea8914bc230d473f558116d932f26f2b5d055.tar.bz2
mana-client-7d8ea8914bc230d473f558116d932f26f2b5d055.tar.xz
mana-client-7d8ea8914bc230d473f558116d932f26f2b5d055.zip
Fixed tileset loading to clear tilesets vector when finished.
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;
}