diff --git a/indra/llcommon/llthreadlocalstorage.h b/indra/llcommon/llthreadlocalstorage.h index fd44589299b809e2a89229bb6d33da2a0f67850b..4873b2740dd37ded197bddd5bbcadcf36280ded8 100644 --- a/indra/llcommon/llthreadlocalstorage.h +++ b/indra/llcommon/llthreadlocalstorage.h @@ -177,12 +177,14 @@ class LLThreadLocalSingleton llwarns << "Trying to access deleted singleton " << typeid(DERIVED_TYPE).name() << " creating new instance" << llendl; } +#if LL_DARWIN + createTLSInstance(); +#endif if (!getIfExists()) { setInitState(CONSTRUCTING); DERIVED_TYPE* instancep = new DERIVED_TYPE(); #if LL_DARWIN - createTLSInstance(); S32 result = pthread_setspecific(sInstanceKey, (void*)instancep); if (result != 0) {