X-Git-Url: https://git.saurik.com/apple/icu.git/blobdiff_plain/57a6839dcb3bba09e8228b822b290604668416fe..ef6cf650f4a75c3f97de06b51fa104f2069b9ea2:/icuSources/layout/IndicReordering.cpp diff --git a/icuSources/layout/IndicReordering.cpp b/icuSources/layout/IndicReordering.cpp index e0e80bb7..1ebc94a6 100644 --- a/icuSources/layout/IndicReordering.cpp +++ b/icuSources/layout/IndicReordering.cpp @@ -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);