diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-12-27 17:22:20 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-12-27 19:04:07 +0300 |
commit | de14ddf3a141cb0e2baff00b06dc7d86d3088916 (patch) | |
tree | cc206783f46d99c5ae854a4c27089064b142b2a1 /source/blender/blenkernel | |
parent | 7bed048243fef51e92b86e4383fa48d1d18d12ac (diff) |
Fix T59900: duplicate font loading error and memory leak.
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/intern/font.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/font.c b/source/blender/blenkernel/intern/font.c index e51b10a97a4..6c716e58e23 100644 --- a/source/blender/blenkernel/intern/font.c +++ b/source/blender/blenkernel/intern/font.c @@ -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)); } } |