summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/resources/db/deaddb.cpp8
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()