blob: 51213fd80783652c5395b62087d48b3fcdd456ea [file] [log] [blame]
Index: source/common/ubrk.cpp
===================================================================
--- source/common/ubrk.cpp (revision 120256)
+++ source/common/ubrk.cpp (working copy)
@@ -166,6 +166,13 @@
int32_t textLength,
UErrorCode* status)
{
+ if (bi == NULL) {
+ if (U_SUCCESS(*status)) {
+ *status = U_ILLEGAL_ARGUMENT_ERROR;
+ }
+ return;
+ }
+
BreakIterator *brit = (BreakIterator *)bi;
UText ut = UTEXT_INITIALIZER;
utext_openUChars(&ut, text, textLength, status);
@@ -181,6 +188,13 @@
UText *text,
UErrorCode *status)
{
+ if (bi == NULL) {
+ if (U_SUCCESS(*status)) {
+ *status = U_ILLEGAL_ARGUMENT_ERROR;
+ }
+ return;
+ }
+
RuleBasedBreakIterator *brit = (RuleBasedBreakIterator *)bi;
brit->RuleBasedBreakIterator::setText(text, *status);
}