corrected template cleanup (previous commit)

This commit is contained in:
john30
2015-11-22 10:39:34 +01:00
parent 89d8167580
commit f08071a52e
+3 -1
View File
@@ -460,6 +460,7 @@ void shutdown()
for (map<string, DataFieldTemplates*>::iterator it = templatesByPath.begin(); it != templatesByPath.end(); it++) {
if (it->second!=&globalTemplates)
delete it->second;
it->second = NULL;
}
templatesByPath.clear();
@@ -641,7 +642,8 @@ result_t loadConfigFiles(MessageMap* messages, bool verbose)
messages->clear();
globalTemplates.clear();
for (map<string, DataFieldTemplates*>::iterator it = templatesByPath.begin(); it != templatesByPath.end(); it++) {
delete it->second;
if (it->second!=&globalTemplates)
delete it->second;
it->second = NULL;
}
templatesByPath.clear();