Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2011-09-19 18:09:13 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2011-09-19 18:09:13 +0400
commit5c7b5c0b51f57ad19b79eac78e3e4afb263b23cc (patch)
tree28032da573c9366ab0d0f16ae1c93273108d13e4 /source/blender/blenfont/intern/blf_font.c
parent712e434a5f71fc4afc52e399af917d137c49308b (diff)
Blenfont: fix use incorrect clear of ascii glyph cache, leading to crash
when toggling use antialising user preference. Also fix some other use of uninitialized memory found by valgrind.
Diffstat (limited to 'source/blender/blenfont/intern/blf_font.c')
-rw-r--r--source/blender/blenfont/intern/blf_font.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/blenfont/intern/blf_font.c b/source/blender/blenfont/intern/blf_font.c
index f3f3b759e5c..26af3a3fd4f 100644
--- a/source/blender/blenfont/intern/blf_font.c
+++ b/source/blender/blenfont/intern/blf_font.c
@@ -511,7 +511,7 @@ FontBLF *blf_font_new(const char *name, const char *filename)
FT_Error err;
char *mfile;
- font= (FontBLF *)MEM_mallocN(sizeof(FontBLF), "blf_font_new");
+ font= (FontBLF *)MEM_callocN(sizeof(FontBLF), "blf_font_new");
err= FT_New_Face(ft_lib, filename, 0, &font->face);
if (err) {
MEM_freeN(font);
@@ -553,7 +553,7 @@ FontBLF *blf_font_new_from_mem(const char *name, unsigned char *mem, int mem_siz
FontBLF *font;
FT_Error err;
- font= (FontBLF *)MEM_mallocN(sizeof(FontBLF), "blf_font_new_from_mem");
+ font= (FontBLF *)MEM_callocN(sizeof(FontBLF), "blf_font_new_from_mem");
err= FT_New_Memory_Face(ft_lib, mem, mem_size, 0, &font->face);
if (err) {
MEM_freeN(font);