src/share/native/sun/font/layout/IndicReordering.cpp

Print this page

        

*** 1094,1106 **** } } le_int32 IndicReordering::v2process(const LEUnicode *chars, le_int32 charCount, le_int32 scriptCode, ! LEUnicode *outChars, LEGlyphStorage &glyphStorage) { const IndicClassTable *classTable = IndicClassTable::getScriptClassTable(scriptCode); DynamicProperties dynProps[INDIC_BLOCK_SIZE]; IndicReordering::getDynamicProperties(dynProps,classTable); IndicReorderingOutput output(outChars, glyphStorage, NULL); --- 1094,1110 ---- } } le_int32 IndicReordering::v2process(const LEUnicode *chars, le_int32 charCount, le_int32 scriptCode, ! LEUnicode *outChars, LEGlyphStorage &glyphStorage, LEErrorCode& success) { const IndicClassTable *classTable = IndicClassTable::getScriptClassTable(scriptCode); + if (classTable == NULL) { + success = LE_MEMORY_ALLOCATION_ERROR; + return 0; + } DynamicProperties dynProps[INDIC_BLOCK_SIZE]; IndicReordering::getDynamicProperties(dynProps,classTable); IndicReorderingOutput output(outChars, glyphStorage, NULL);