ICU-3764 better error checking for break iterator

X-SVN-Rev: 15350
This commit is contained in:
Steven R. Loomis 2004-05-18 00:47:29 +00:00
parent 084b114a93
commit 80d2e532c0

View File

@ -414,7 +414,7 @@ BreakIterator::createInstance(const Locale& loc, UBreakIteratorType kind, UError
// handleDefault calls), so we don't touch it. YES, A COMMENT
// THIS LONG is a sign of bad code -- so the action item is to
// revisit this in ICU 3.0 and clean it up/fix it/remove it.
if (*actualLoc.getName() != 0) {
if (U_SUCCESS(status) && (result != NULL) && *actualLoc.getName() != 0) {
U_LOCALE_BASED(locBased, *result);
locBased.setLocaleIDs(actualLoc.getName(), actualLoc.getName());
}