Merge branch 'blender2.7'
[blender.git] / source / blender / blenkernel / intern / font.c
index 9c24cc4..d796110 100644 (file)
@@ -244,7 +244,6 @@ VFont *BKE_vfont_load(Main *bmain, const char *filepath)
        char filename[FILE_MAXFILE];
        VFont *vfont = NULL;
        PackedFile *pf;
-       PackedFile *temp_pf = NULL;
        bool is_builtin;
 
        if (STREQ(filepath, FO_BUILTIN_NAME)) {
@@ -256,7 +255,6 @@ VFont *BKE_vfont_load(Main *bmain, const char *filepath)
        else {
                BLI_split_file_part(filepath, filename, sizeof(filename));
                pf = newPackedFile(NULL, filepath, BKE_main_blendfile_path(bmain));
-               temp_pf = newPackedFile(NULL, filepath, BKE_main_blendfile_path(bmain));
 
                is_builtin = false;
        }
@@ -282,7 +280,7 @@ VFont *BKE_vfont_load(Main *bmain, const char *filepath)
 
                        /* Do not add FO_BUILTIN_NAME to temporary listbase */
                        if (!STREQ(filename, FO_BUILTIN_NAME)) {
-                               vfont->temp_pf = temp_pf;
+                               vfont->temp_pf = newPackedFile(NULL, filepath, BKE_main_blendfile_path(bmain));
                        }
                }
 
@@ -690,7 +688,7 @@ static bool vfont_to_curve(Object *ob, Curve *cu, int mode,
        struct CharTrans *chartransdata = NULL, *ct;
        struct TempLineInfo *lineinfo;
        float *f, xof, yof, xtrax, linedist;
-       float twidth, maxlen = 0;
+       float twidth = 0, maxlen = 0;
        int i, slen, j;
        int curbox;
        int selstart, selend;
@@ -1285,7 +1283,7 @@ makebreak:
                }
        }
 
-       if (ELEM(mode, FO_CURSUP, FO_CURSDOWN, FO_PAGEUP, FO_PAGEDOWN) && 
+       if (ELEM(mode, FO_CURSUP, FO_CURSDOWN, FO_PAGEUP, FO_PAGEDOWN) &&
            iter_data->status == VFONT_TO_CURVE_INIT)
        {
                ct = &chartransdata[ef->pos];