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_dir.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_dir.c')
-rw-r--r--source/blender/blenfont/intern/blf_dir.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/blenfont/intern/blf_dir.c b/source/blender/blenfont/intern/blf_dir.c
index 1c99af0c7a9..46be49b37e9 100644
--- a/source/blender/blenfont/intern/blf_dir.c
+++ b/source/blender/blenfont/intern/blf_dir.c
@@ -76,7 +76,7 @@ void BLF_dir_add(const char *path)
if (dir) /* already in the list ? just return. */
return;
- dir= (DirBLF *)MEM_mallocN(sizeof(DirBLF), "BLF_dir_add");
+ dir= (DirBLF *)MEM_callocN(sizeof(DirBLF), "BLF_dir_add");
dir->path= BLI_strdup(path);
BLI_addhead(&global_font_dir, dir);
}
@@ -104,7 +104,7 @@ char **BLF_dir_get(int *ndir)
if (!count)
return NULL;
- dirs= (char **)MEM_mallocN(sizeof(char *) * count, "BLF_dir_get");
+ dirs= (char **)MEM_callocN(sizeof(char *) * count, "BLF_dir_get");
p= global_font_dir.first;
i= 0;
while (p) {