diff --git a/icu4c/source/i18n/dtfmtsym.cpp b/icu4c/source/i18n/dtfmtsym.cpp index 84daeb08b0..19a498c085 100644 --- a/icu4c/source/i18n/dtfmtsym.cpp +++ b/icu4c/source/i18n/dtfmtsym.cpp @@ -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 }