]> 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 d64d8ed043f92334e3a5c2aa94617e93a7af9219..1ebc94a60cd61cf0885eeb683672f2e61eb90e99 100644 (file)
@@ -1,6 +1,6 @@
 /*
 / *
- * (C) Copyright IBM Corp. 1998-2012 - All Rights Reserved
+ * (C) Copyright IBM Corp. 1998-2015 - All Rights Reserved
  *
  */
 
@@ -633,6 +633,11 @@ 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_INTERNAL_ERROR;
+        return 0;
+    }
+
     if (classTable->scriptFlags & SF_MPRE_FIXUP) {
         mpreFixups = new MPreFixups(charCount);
         if (mpreFixups == NULL) { 
@@ -1069,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);