ICU-5566 Fix a potential double mutex lock.
X-SVN-Rev: 21257
This commit is contained in:
parent
7b1b840ef1
commit
5d2448808c
@ -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…
Reference in New Issue
Block a user