From 80d2e532c0d2839072ebeb16654f33954d5aabfa Mon Sep 17 00:00:00 2001 From: "Steven R. Loomis" Date: Tue, 18 May 2004 00:47:29 +0000 Subject: [PATCH] ICU-3764 better error checking for break iterator X-SVN-Rev: 15350 --- icu4c/source/common/brkiter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/icu4c/source/common/brkiter.cpp b/icu4c/source/common/brkiter.cpp index 4c2d4240db..50eb789489 100644 --- a/icu4c/source/common/brkiter.cpp +++ b/icu4c/source/common/brkiter.cpp @@ -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()); }