Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / Source / platform / fonts / opentype / OpenTypeVerticalData.cpp
index 7c8ab6e..c1df3ab 100644 (file)
@@ -560,10 +560,9 @@ void OpenTypeVerticalData::substituteWithVerticalGlyphs(const SimpleFontData* fo
         return;
 
     for (unsigned index = offset, end = offset + length; index < end; ++index) {
-        Glyph glyph = glyphPage->glyphAt(index);
-        if (glyph) {
-            ASSERT(glyphPage->glyphDataForIndex(index).fontData == font);
-            Glyph to = map.get(glyph);
+        GlyphData glyphData = glyphPage->glyphDataForIndex(index);
+        if (glyphData.glyph && glyphData.fontData == font) {
+            Glyph to = map.get(glyphData.glyph);
             if (to)
                 glyphPage->setGlyphDataForIndex(index, to, font);
         }