jdk/src/java.desktop/unix/native/common/awt/fontpath.c
changeset 39025 bbc996c042d3
parent 35297 e0ab9045a0dc
child 40153 33332d3217a9
--- a/jdk/src/java.desktop/unix/native/common/awt/fontpath.c	Thu Jun 02 15:36:15 2016 +0300
+++ b/jdk/src/java.desktop/unix/native/common/awt/fontpath.c	Fri Jun 03 11:37:45 2016 +0530
@@ -1012,17 +1012,20 @@
     jfieldID familyNameID, styleNameID, fullNameID, fontFileID;
     jmethodID fcFontCons;
     char* debugMinGlyphsStr = getenv("J2D_DEBUG_MIN_GLYPHS");
+    jclass fcInfoClass;
+    jclass fcCompFontClass;
+    jclass fcFontClass;
 
     CHECK_NULL(fcInfoObj);
     CHECK_NULL(fcCompFontArray);
 
-    jclass fcInfoClass =
+    fcInfoClass =
         (*env)->FindClass(env, "sun/font/FontConfigManager$FontConfigInfo");
     CHECK_NULL(fcInfoClass);
-    jclass fcCompFontClass =
+    fcCompFontClass =
         (*env)->FindClass(env, "sun/font/FontConfigManager$FcCompFont");
     CHECK_NULL(fcCompFontClass);
-    jclass fcFontClass =
+    fcFontClass =
          (*env)->FindClass(env, "sun/font/FontConfigManager$FontConfigFont");
     CHECK_NULL(fcFontClass);
 
@@ -1146,7 +1149,8 @@
         int fn, j, fontCount, nfonts;
         unsigned int minGlyphs;
         FcChar8 **family, **styleStr, **fullname, **file;
-        jarray fcFontArr;
+        jarray fcFontArr = NULL;
+        FcCharSet *unionCharset = NULL;
 
         fcCompFontObj = (*env)->GetObjectArrayElement(env, fcCompFontArray, i);
         fcNameStr =
@@ -1218,7 +1222,7 @@
                 minGlyphs = val;
             }
         }
-        FcCharSet *unionCharset = NULL;
+
         for (j=0; j<nfonts; j++) {
             FcPattern *fontPattern = fontset->fonts[j];
             FcChar8 *fontformat;