changeset 4773:b3d6b8a43aca

7124223: [macosx] Regression test failure with new exception, when glyph is positioned explicitly Reviewed-by: prr
author bae
date Wed, 15 Feb 2012 11:38:17 +0400
parents d6c10291eeee
children 384fcc3c2ea2
files src/share/classes/sun/print/PathGraphics.java
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/sun/print/PathGraphics.java	Tue Feb 14 22:44:04 2012 +0000
+++ b/src/share/classes/sun/print/PathGraphics.java	Wed Feb 15 11:38:17 2012 +0400
@@ -1025,7 +1025,8 @@
                 continue;
             }
             glyph = font2D.charToGlyph(c);
-            if (glyph != missingGlyph && glyph < numGlyphs &&
+            if (glyph != missingGlyph &&
+                glyph >= 0 && glyph < numGlyphs &&
                 (glyphToCharMap[glyph] ==
                  CharToGlyphMapper.INVISIBLE_GLYPH_ID)) {
                 glyphToCharMap[glyph] = c;