From 1a01542e22a7c602b4e2733a42d933600c5e6609 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Wed, 24 Apr 2013 21:04:51 -0700 Subject: BUILDFIX: singleton unit test could not resurrect singleton --- indra/llcommon/llsingleton.h | 6 ++++++ 1 file changed, 6 insertions(+) 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 @@ -77,6 +77,11 @@ private: SingletonInstanceData() : 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) -- cgit v1.2.3