summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--project2/common/scriptLoader.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/project2/common/scriptLoader.cpp b/project2/common/scriptLoader.cpp
index 9b1a36d..8237163 100644
--- a/project2/common/scriptLoader.cpp
+++ b/project2/common/scriptLoader.cpp
@@ -1,4 +1,5 @@
#include <pch.hpp>
+#include "scopeObject.h"
#include "scriptLoader.h"
#include "scriptStorage.h"
#include "logger.h"
@@ -138,10 +139,10 @@ LoaderBase::collectAll(const CommonObjects * co, bool childrenOnly, ScriptNodePt
targets.erase(i);
}
if (co) {
+ ScopeObject clr(boost::bind(&std::set<SourceObjectPtr>::clear, &loadedObjects));
BOOST_FOREACH(SourceObjectPtr o, loadedObjects) {
o->loadComplete(co);
}
- loadedObjects.clear();
}
}