BUILDFIX: singleton unit test could not resurrect singleton
parent
5622a47403
commit
1a01542e22
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue