]> granicus.if.org Git - icu/commitdiff
ICU-11131 on low memory situations, return U_MEMORY_ALLOCATION_ERROR instead of crash
authorSteven R. Loomis <srl@icu-project.org>
Wed, 10 Sep 2014 15:39:02 +0000 (15:39 +0000)
committerSteven R. Loomis <srl@icu-project.org>
Wed, 10 Sep 2014 15:39:02 +0000 (15:39 +0000)
X-SVN-Rev: 36430

icu4c/source/i18n/smpdtfmt.cpp

index 0d5f90a4f828eaffe1004b38d1d4a108aa253d09..3df9c3000c7d2e37db1b4331c64b745da9526bb4 100644 (file)
@@ -1081,6 +1081,7 @@ SimpleDateFormat::initNumberFormatters(const Locale &locale,UErrorCode &status)
             }
         } else {
             status = U_MEMORY_ALLOCATION_ERROR;
+            return; // exit with the allocation error
         }
     }
     umtx_unlock(&LOCK);