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)