summaryrefslogtreecommitdiff
path: root/indra/llcommon
diff options
context:
space:
mode:
authorRichard Linden <none@none>2013-04-29 10:58:37 -0700
committerRichard Linden <none@none>2013-04-29 10:58:37 -0700
commit41e5bf346eaa0a43646058691cc8090ddfe498e9 (patch)
tree1f74429ce6c66c5dc06bfd8b2a47d39224bb69b1 /indra/llcommon
parent215612bde86969e49ff9577d1d64390696280b3e (diff)
SH-4080 WIP interesting: random crash on Mac
fixed singleton unit test resurrecting a singleton now properly calls initSingleton()
Diffstat (limited to 'indra/llcommon')
-rw-r--r--indra/llcommon/llsingleton.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/indra/llcommon/llsingleton.h b/indra/llcommon/llsingleton.h
index 7558bf4fae..40002313f1 100644
--- a/indra/llcommon/llsingleton.h
+++ b/indra/llcommon/llsingleton.h
@@ -136,21 +136,22 @@ public:
case UNINITIALIZED:
// should never be uninitialized at this point
llassert(false);
- break;
+ return NULL;
case CONSTRUCTING:
llerrs << "Tried to access singleton " << typeid(DERIVED_TYPE).name() << " from singleton constructor!" << llendl;
- break;
+ return NULL;
case INITIALIZING:
// go ahead and flag ourselves as initialized so we can be reentrant during initialization
sData.mInitState = INITIALIZED;
sData.mInstance->initSingleton();
return sData.mInstance;
- break;
case INITIALIZED:
return sData.mInstance;
case DELETED:
llwarns << "Trying to access deleted singleton " << typeid(DERIVED_TYPE).name() << " creating new instance" << llendl;
SingletonLifetimeManager::construct();
+ sData.mInitState = INITIALIZED;
+ sData.mInstance->initSingleton();
return sData.mInstance;
}