mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-20 20:19:32 +00:00
ICU-5566 Fix a potential double mutex lock.
X-SVN-Rev: 21257
This commit is contained in:
parent
7b1b840ef1
commit
5d2448808c
1 changed files with 5 additions and 3 deletions
|
@ -992,13 +992,15 @@ DateFormatSymbols::getZoneStrings(int32_t& rowCount, int32_t& columnCount) const
|
|||
if(fZoneStrings==NULL){
|
||||
// cast away const to get around the problem for lazy initialization
|
||||
((DateFormatSymbols*)this)->initZoneStringsArray(status);
|
||||
if(U_FAILURE(status)){
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
rowCount = fZoneStringsRowCount;
|
||||
columnCount = fZoneStringsColCount;
|
||||
umtx_unlock(&LOCK);
|
||||
if(U_FAILURE(status)){
|
||||
rowCount = 0;
|
||||
columnCount = 0;
|
||||
return NULL;
|
||||
}
|
||||
return (const UnicodeString**)fZoneStrings; // Compiler requires cast
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue