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, 8 insertions, 0 deletions
diff --git a/src/resources/mapreader.cpp b/src/resources/mapreader.cpp
index 31c2cb75..031188c1 100644
--- a/src/resources/mapreader.cpp
+++ b/src/resources/mapreader.cpp
@@ -82,7 +82,9 @@ Map* MapReader::readMap(xmlNodePtr node, const std::string &path)
xmlChar *prop;
prop = xmlGetProp(node, BAD_CAST "version");
+#ifndef WIN32
xmlFree(prop);
+#endif
int w = getProperty(node, "width", 0);
int h = getProperty(node, "height", 0);
@@ -142,7 +144,9 @@ void MapReader::readTileset(xmlNodePtr node, const std::string &path, Map *map)
xmlChar* prop = xmlGetProp(node, BAD_CAST "source");
if (prop) {
log("Warning: External tilesets not supported yet.");
+#ifndef WIN32
xmlFree(prop);
+#endif
return;
}
@@ -169,7 +173,9 @@ void MapReader::readTileset(xmlNodePtr node, const std::string &path, Map *map)
Spriteset *set = new Spriteset(tilebmp, tw, th);
//set->setFirstGid(firstgid);
// TODO: Like uhm, do something with this set!
+#ifndef WIN32
xmlFree(source);
+#endif
}
else {
log("Warning: Failed to load tileset (%s)\n", source);
@@ -188,7 +194,9 @@ int MapReader::getProperty(xmlNodePtr node, const char* name, int def)
xmlChar *prop = xmlGetProp(node, BAD_CAST name);
if (prop) {
int val = atoi((char*)prop);
+#ifndef WIN32
xmlFree(prop);
+#endif
return val;
}
else {