--- a/jdk/src/share/native/sun/font/layout/ExtensionSubtables.cpp Tue Feb 26 10:07:26 2013 -0800
+++ b/jdk/src/share/native/sun/font/layout/ExtensionSubtables.cpp Thu Mar 07 10:02:20 2013 -0800
@@ -47,6 +47,8 @@
le_uint32 ExtensionSubtable::process(const LookupProcessor *lookupProcessor, le_uint16 lookupType,
GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode& success) const
{
+ const LEReferenceTo<ExtensionSubtable> thisRef(lookupProcessor->getReference(), success); // create a reference to this
+
if (LE_FAILURE(success)) {
return 0;
}
@@ -55,9 +57,11 @@
if (elt != lookupType) {
le_uint32 extOffset = READ_LONG(extensionOffset);
- LookupSubtable *subtable = (LookupSubtable *) ((char *) this + extOffset);
+ LEReferenceTo<LookupSubtable> subtable(thisRef, success, extOffset);
- return lookupProcessor->applySubtable(subtable, elt, glyphIterator, fontInstance, success);
+ if(LE_SUCCESS(success)) {
+ return lookupProcessor->applySubtable(subtable, elt, glyphIterator, fontInstance, success);
+ }
}
return 0;