Skip to content
Snippets Groups Projects
Commit 1a01542e authored by Richard Linden's avatar Richard Linden
Browse files

BUILDFIX: singleton unit test could not resurrect singleton

parent 5622a474
No related branches found
No related tags found
No related merge requests found
......@@ -77,6 +77,11 @@ class LLSingleton : private boost::noncopyable
SingletonInstanceData()
: mSingletonInstance(NULL),
mInitState(CONSTRUCTING)
{
construct();
}
void construct()
{
mSingletonInstance = new DERIVED_TYPE();
mInitState = INITIALIZING;
......@@ -139,6 +144,7 @@ class LLSingleton : private boost::noncopyable
if (data.mInitState == DELETED)
{
llwarns << "Trying to access deleted singleton " << typeid(DERIVED_TYPE).name() << " creating new instance" << llendl;
data.construct();
}
if (data.mInitState == INITIALIZING)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment