diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-01-07 17:00:59 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-01-07 17:00:59 +0300 |
commit | cce1a905f8d798eb689956395daf6161f034ae6f (patch) | |
tree | ed8b9cce39c084c4d6506afa18abf85bacdbc8d6 /src/resources | |
parent | f6bd1332857b003d258fce4f12a14540208bea2c (diff) | |
download | plus-cce1a905f8d798eb689956395daf6161f034ae6f.tar.gz plus-cce1a905f8d798eb689956395daf6161f034ae6f.tar.bz2 plus-cce1a905f8d798eb689956395daf6161f034ae6f.tar.xz plus-cce1a905f8d798eb689956395daf6161f034ae6f.zip |
fix deaddb loading.
Diffstat (limited to 'src/resources')
-rw-r--r-- | src/resources/db/deaddb.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/resources/db/deaddb.cpp b/src/resources/db/deaddb.cpp index 078813583..870b77394 100644 --- a/src/resources/db/deaddb.cpp +++ b/src/resources/db/deaddb.cpp @@ -37,16 +37,17 @@ namespace void DeadDB::load() { + if (mLoaded) + unload(); + loadXmlFile(paths.getStringValue("deadMessagesFile")); loadXmlFile(paths.getStringValue("deadMessagesPatchFile")); loadXmlDir("deadMessagesPatchDir", loadXmlFile); + mLoaded = true; } void DeadDB::loadXmlFile(const std::string &fileName) { - if (mLoaded) - unload(); - XML::Document *doc = new XML::Document(fileName); const XmlNodePtr root = doc->rootNode(); @@ -78,7 +79,6 @@ void DeadDB::loadXmlFile(const std::string &fileName) } delete doc; - mLoaded = true; } void DeadDB::unload() |