Index: src/i18n.cc |
diff --git a/src/i18n.cc b/src/i18n.cc |
index ba44687aa90dd57932cc36f4feb3986004dac856..69fa9ca89583c45dcfd2e1a709894dc9baf3224a 100644 |
--- a/src/i18n.cc |
+++ b/src/i18n.cc |
@@ -704,6 +704,10 @@ icu::SimpleDateFormat* DateFormat::InitializeDateTimeFormat( |
icu::Locale no_extension_locale(icu_locale.getBaseName()); |
date_format = CreateICUDateFormat(isolate, no_extension_locale, options); |
+ if (!date_format) { |
+ FATAL("Failed to create ICU date format, are ICU data files missing?"); |
+ } |
+ |
// Set resolved settings (pattern, numbering system, calendar). |
SetResolvedDateSettings( |
isolate, no_extension_locale, date_format, resolved); |
@@ -780,6 +784,10 @@ icu::DecimalFormat* NumberFormat::InitializeNumberFormat( |
number_format = CreateICUNumberFormat( |
isolate, no_extension_locale, options); |
+ if (!number_format) { |
+ FATAL("Failed to create ICU number format, are ICU data files missing?"); |
+ } |
+ |
// Set resolved settings (pattern, numbering system). |
SetResolvedNumberSettings( |
isolate, no_extension_locale, number_format, resolved); |
@@ -839,6 +847,10 @@ icu::Collator* Collator::InitializeCollator( |
icu::Locale no_extension_locale(icu_locale.getBaseName()); |
collator = CreateICUCollator(isolate, no_extension_locale, options); |
+ if (!collator) { |
+ FATAL("Failed to create ICU collator, are ICU data files missing?"); |
+ } |
+ |
// Set resolved settings (pattern, numbering system). |
SetResolvedCollatorSettings( |
isolate, no_extension_locale, collator, resolved); |
@@ -898,6 +910,10 @@ icu::BreakIterator* BreakIterator::InitializeBreakIterator( |
break_iterator = CreateICUBreakIterator( |
isolate, no_extension_locale, options); |
+ if (!break_iterator) { |
+ FATAL("Failed to create ICU break iterator, are ICU data files missing?"); |
+ } |
+ |
// Set resolved settings (locale). |
SetResolvedBreakIteratorSettings( |
isolate, no_extension_locale, break_iterator, resolved); |