BUILDFIX: singleton unit test could not resurrect singleton

meow-7.2.2
Richard Linden 2013-04-24 21:04:51 -07:00
parent 5622a47403
commit 1a01542e22
1 changed files with 6 additions and 0 deletions

View File

@ -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)