changeset 5761:8e6b8a676596

Merge
author lana
date Tue, 03 Jul 2012 20:54:45 -0700
parents 8d2ed9d58453 (current diff) c960cb8d0f8b (diff)
children 8a284872ee2d
files
diffstat 3 files changed, 13 insertions(+), 17 deletions(-) [+]
line wrap: on
line diff
--- a/src/macosx/classes/sun/awt/CGraphicsEnvironment.java	Thu Jun 28 09:33:05 2012 -0700
+++ b/src/macosx/classes/sun/awt/CGraphicsEnvironment.java	Tue Jul 03 20:54:45 2012 -0700
@@ -200,29 +200,25 @@
        return true;
     }
 
-    private Font[] allFontsWithLogical;
     static String[] sLogicalFonts = { "Serif", "SansSerif", "Monospaced", "Dialog", "DialogInput" };
 
     @Override
     public Font[] getAllFonts() {
-        if (allFontsWithLogical == null)
-        {
-            Font[] newFonts;
-            Font[] superFonts = super.getAllFonts();
 
-            int numLogical = sLogicalFonts.length;
-            int numOtherFonts = superFonts.length;
+        Font[] newFonts;
+        Font[] superFonts = super.getAllFonts();
+
+        int numLogical = sLogicalFonts.length;
+        int numOtherFonts = superFonts.length;
 
-            newFonts = new Font[numOtherFonts + numLogical];
-            System.arraycopy(superFonts,0,newFonts,numLogical,numOtherFonts);
+        newFonts = new Font[numOtherFonts + numLogical];
+        System.arraycopy(superFonts,0,newFonts,numLogical,numOtherFonts);
 
-            for (int i = 0; i < numLogical; i++)
-            {
-                newFonts[i] = new Font(sLogicalFonts[i], Font.PLAIN, 1);
-            }
-            allFontsWithLogical = newFonts;
+        for (int i = 0; i < numLogical; i++)
+        {
+            newFonts[i] = new Font(sLogicalFonts[i], Font.PLAIN, 1);
         }
-        return java.util.Arrays.copyOf(allFontsWithLogical, allFontsWithLogical.length);
+        return newFonts;
     }
 
 }
--- a/src/solaris/native/sun/awt/fontpath.c	Thu Jun 28 09:33:05 2012 -0700
+++ b/src/solaris/native/sun/awt/fontpath.c	Tue Jul 03 20:54:45 2012 -0700
@@ -1240,7 +1240,7 @@
                                             FC_CHARSET, 0, &charset);
             if (result != FcResultMatch) {
                 free(family);
-                free(family);
+                free(fullname);
                 free(styleStr);
                 free(file);
                 (*FcPatternDestroy)(pattern);
--- a/src/windows/native/sun/font/lcdglyph.c	Thu Jun 28 09:33:05 2012 -0700
+++ b/src/windows/native/sun/font/lcdglyph.c	Tue Jul 03 20:54:45 2012 -0700
@@ -409,7 +409,7 @@
      */
     imageSize = bytesWidth*height;
     glyphInfo = (GlyphInfo*)malloc(sizeof(GlyphInfo)+imageSize);
-    if (malloc == NULL) {
+    if (glyphInfo == NULL) {
         FREE_AND_RETURN;
     }
     glyphInfo->cellInfo = NULL;