summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Linden <none@none>2013-04-24 21:04:51 -0700
committerRichard Linden <none@none>2013-04-24 21:04:51 -0700
commit1a01542e22a7c602b4e2733a42d933600c5e6609 (patch)
tree2350b4faa4b77807b2423dd81528572eaa57109e
parent5622a47403443fb7b4b459fac1b0206deb2eadb3 (diff)
BUILDFIX: singleton unit test could not resurrect singleton
-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)