ICU-6132 Check to make sure historicRules[typeIdx] is not null.
X-SVN-Rev: 23257
This commit is contained in:
parent
fc445e22ef
commit
a739349c53
@ -704,6 +704,12 @@ OlsonTimeZone::initTransitionRules(UErrorCode& status) {
|
||||
}
|
||||
historicRules[typeIdx] = new TimeArrayTimeZoneRule((dst == 0 ? stdName : dstName),
|
||||
raw, dst, times, nTimes, DateTimeRule::UTC_TIME);
|
||||
// Check for memory allocation error
|
||||
if (historicRules[typeIdx] == NULL) {
|
||||
status = U_MEMORY_ALLOCATION_ERROR;
|
||||
deleteTransitionRules();
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
uprv_free(times);
|
||||
|
Loading…
Reference in New Issue
Block a user