]> git.saurik.com Git - apple/icu.git/blobdiff - icuSources/layout/IndicReordering.cpp
ICU-57132.0.1.tar.gz
[apple/icu.git] / icuSources / layout / IndicReordering.cpp
index e0e80bb73c1248865d64ab25d588df61b92ad7a3..1ebc94a60cd61cf0885eeb683672f2e61eb90e99 100644 (file)
@@ -1,6 +1,6 @@
 /*
 / *
- * (C) Copyright IBM Corp. 1998-2013 - All Rights Reserved
+ * (C) Copyright IBM Corp. 1998-2015 - All Rights Reserved
  *
  */
 
@@ -633,9 +633,9 @@ le_int32 IndicReordering::reorder(const LEUnicode *chars, le_int32 charCount, le
     MPreFixups *mpreFixups = NULL;
     const IndicClassTable *classTable = IndicClassTable::getScriptClassTable(scriptCode);
 
-    if(classTable==NULL) {
-      success = LE_MEMORY_ALLOCATION_ERROR;
-      return 0;
+    if (classTable==NULL) {
+        success = LE_INTERNAL_ERROR;
+        return 0;
     }
 
     if (classTable->scriptFlags & SF_MPRE_FIXUP) {
@@ -1074,6 +1074,9 @@ le_int32 IndicReordering::v2process(const LEUnicode *chars, le_int32 charCount,
                                   LEUnicode *outChars, LEGlyphStorage &glyphStorage)
 {
     const IndicClassTable *classTable = IndicClassTable::getScriptClassTable(scriptCode);
+    if (classTable == NULL) {
+        return 0;
+    }
 
     DynamicProperties dynProps[INDIC_BLOCK_SIZE];
     IndicReordering::getDynamicProperties(dynProps,classTable);