X-Git-Url: https://git.saurik.com/apple/icu.git/blobdiff_plain/0f5d89e82340278ed3d7d50029f37cab2c41a57e..a01113dcd0f39d5da295ef82785beff9ed86fe38:/icuSources/common/brkeng.cpp diff --git a/icuSources/common/brkeng.cpp b/icuSources/common/brkeng.cpp index 7144af60..80e11585 100644 --- a/icuSources/common/brkeng.cpp +++ b/icuSources/common/brkeng.cpp @@ -124,14 +124,13 @@ static void U_CALLCONV _deleteEngine(void *obj) { U_CDECL_END U_NAMESPACE_BEGIN -static UMutex gBreakEngineMutex = U_MUTEX_INITIALIZER; - const LanguageBreakEngine * ICULanguageBreakFactory::getEngineFor(UChar32 c) { const LanguageBreakEngine *lbe = NULL; UErrorCode status = U_ZERO_ERROR; - Mutex m(&gBreakEngineMutex); + static UMutex *gBreakEngineMutex = STATIC_NEW(UMutex); + Mutex m(gBreakEngineMutex); if (fEngines == NULL) { UStack *engines = new UStack(_deleteEngine, NULL, status);