diff options
author | Ira Rice <irarice@gmail.com> | 2008-11-02 15:35:36 +0000 |
---|---|---|
committer | Ira Rice <irarice@gmail.com> | 2008-11-02 15:35:36 +0000 |
commit | 25cda302161fe6be6f70a6228b8f40467c77929e (patch) | |
tree | df9731698d118c56d59ca1215e67900a2f53e159 /src | |
parent | 85381cb0cfeac608af58883810ffff134ac60ed3 (diff) | |
download | mana-25cda302161fe6be6f70a6228b8f40467c77929e.tar.gz mana-25cda302161fe6be6f70a6228b8f40467c77929e.tar.bz2 mana-25cda302161fe6be6f70a6228b8f40467c77929e.tar.xz mana-25cda302161fe6be6f70a6228b8f40467c77929e.zip |
Fixed a potential crash.
Diffstat (limited to 'src')
-rw-r--r-- | src/resources/colordb.cpp | 5 |
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) { |