< prev index next >

src/java.desktop/unix/native/common/awt/fontpath.c

Print this page

        

@@ -1010,21 +1010,24 @@
     void* libfontconfig;
     jfieldID fcNameID, fcFirstFontID, fcAllFontsID, fcVersionID, fcCacheDirsID;
     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);
 
 
     CHECK_NULL(fcVersionID = (*env)->GetFieldID(env, fcInfoClass, "fcVersion", "I"));

@@ -1144,11 +1147,12 @@
     for (i=0; i<arrlen; i++) {
         FcFontSet* fontset;
         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 =
             (jstring)((*env)->GetObjectField(env, fcCompFontObj, fcNameID));
         fcName = (*env)->GetStringUTFChars(env, fcNameStr, 0);

@@ -1216,11 +1220,11 @@
             sscanf(debugMinGlyphsStr, "%5d", &val);
             if (val >= 0 && val <= 65536) {
                 minGlyphs = val;
             }
         }
-        FcCharSet *unionCharset = NULL;
+
         for (j=0; j<nfonts; j++) {
             FcPattern *fontPattern = fontset->fonts[j];
             FcChar8 *fontformat;
             FcCharSet *charset = NULL;
 
< prev index next >