summaryrefslogtreecommitdiff
path: root/src/resources
diff options
context:
space:
mode:
authorIra Rice <irarice@gmail.com>2008-11-02 15:35:36 +0000
committerIra Rice <irarice@gmail.com>2008-11-02 15:35:36 +0000
commit25cda302161fe6be6f70a6228b8f40467c77929e (patch)
treedf9731698d118c56d59ca1215e67900a2f53e159 /src/resources
parent85381cb0cfeac608af58883810ffff134ac60ed3 (diff)
downloadmana-25cda302161fe6be6f70a6228b8f40467c77929e.tar.gz
mana-25cda302161fe6be6f70a6228b8f40467c77929e.tar.bz2
mana-25cda302161fe6be6f70a6228b8f40467c77929e.tar.xz
mana-25cda302161fe6be6f70a6228b8f40467c77929e.zip
Fixed a potential crash.
Diffstat (limited to 'src/resources')
-rw-r--r--src/resources/colordb.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/resources/colordb.cpp b/src/resources/colordb.cpp
index 271becbf..d654762c 100644
--- a/src/resources/colordb.cpp
+++ b/src/resources/colordb.cpp
@@ -58,6 +58,11 @@ void ColorDB::load()
TMWHair = true;
XML::Document doc(TMW_COLOR_FILE);
root = doc.rootNode();
+ if (!root || !xmlStrEqual(root->name, BAD_CAST "colors"))
+ {
+ mLoaded = true;
+ return;
+ }
}
for_each_xml_child_node(node, root)
{