diff --git a/src/ftxgpos.c b/src/ftxgpos.c index d611d7cb8..a71896ca3 100644 --- a/src/ftxgpos.c +++ b/src/ftxgpos.c @@ -4778,12 +4778,13 @@ if ( class_offset ) { if ( !FILE_Seek( class_offset + base_offset ) ) - error = Load_ClassDefinition( cd, limit, stream ) == TT_Err_Ok; + error = Load_ClassDefinition( cd, limit, stream ); } else error = Load_EmptyClassDefinition ( cd, stream ); - (void)FILE_Seek( cur_offset ); + if (error == TT_ERR_OK) + (void)FILE_Seek( cur_offset ); /* Changes error as a side-effect */ return error; } diff --git a/src/ftxopen.c b/src/ftxopen.c index a072daf71..ba605bd74 100644 --- a/src/ftxopen.c +++ b/src/ftxopen.c @@ -1266,7 +1266,8 @@ FT_UShort* cva = cdf1->ClassValueArray; - *index = 0; + if ( index ) + *index = 0; if ( glyphID >= cdf1->StartGlyph && glyphID <= cdf1->StartGlyph + cdf1->GlyphCount )