From 793d8ff57a327dacac0f4126aa26389af7db45e1 Mon Sep 17 00:00:00 2001 From: randomdan Date: Tue, 13 Mar 2012 23:45:04 +0000 Subject: Fix error persisting when loadComplete fails --- project2/common/scriptLoader.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 +#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::clear, &loadedObjects)); BOOST_FOREACH(SourceObjectPtr o, loadedObjects) { o->loadComplete(co); } - loadedObjects.clear(); } } -- cgit v1.2.3