summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/llcommon/llsingleton.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/indra/llcommon/llsingleton.h b/indra/llcommon/llsingleton.h
index e3b614cf86..1cbefb1cd0 100644
--- a/indra/llcommon/llsingleton.h
+++ b/indra/llcommon/llsingleton.h
@@ -78,6 +78,11 @@ private:
: mSingletonInstance(NULL),
mInitState(CONSTRUCTING)
{
+ construct();
+ }
+
+ void construct()
+ {
mSingletonInstance = new DERIVED_TYPE();
mInitState = INITIALIZING;
}
@@ -139,6 +144,7 @@ public:
if (data.mInitState == DELETED)
{
llwarns << "Trying to access deleted singleton " << typeid(DERIVED_TYPE).name() << " creating new instance" << llendl;
+ data.construct();
}
if (data.mInitState == INITIALIZING)