1 Index: source/common/ubrk.cpp 2 =================================================================== 3 --- source/common/ubrk.cpp (revision 120256) 4 +++ source/common/ubrk.cpp (working copy) 5 @@ -166,6 +166,13 @@ 6 int32_t textLength, 7 UErrorCode* status) 8 { 9 + if (bi == NULL) { 10 + if (U_SUCCESS(*status)) { 11 + *status = U_ILLEGAL_ARGUMENT_ERROR; 12 + } 13 + return; 14 + } 15 + 16 BreakIterator *brit = (BreakIterator *)bi; 17 UText ut = UTEXT_INITIALIZER; 18 utext_openUChars(&ut, text, textLength, status); 19 @@ -181,6 +188,13 @@ 20 UText *text, 21 UErrorCode *status) 22 { 23 + if (bi == NULL) { 24 + if (U_SUCCESS(*status)) { 25 + *status = U_ILLEGAL_ARGUMENT_ERROR; 26 + } 27 + return; 28 + } 29 + 30 RuleBasedBreakIterator *brit = (RuleBasedBreakIterator *)bi; 31 brit->RuleBasedBreakIterator::setText(text, *status); 32 } 33