summaryrefslogtreecommitdiff
path: root/src/resources/mapdb.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/resources/mapdb.cpp')
-rw-r--r--src/resources/mapdb.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/resources/mapdb.cpp b/src/resources/mapdb.cpp
index 2b2beed89..84b5f6cf3 100644
--- a/src/resources/mapdb.cpp
+++ b/src/resources/mapdb.cpp
@@ -121,8 +121,12 @@ void MapDB::readAtlas(XmlNodePtr node)
void MapDB::loadInfo()
{
XML::Document *doc = new XML::Document("maps.xml");
-
const XmlNodePtr root = doc->rootNode();
+ if (!root)
+ {
+ delete doc;
+ return;
+ }
for_each_xml_child_node(node, root)
{