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:
authorCampbell Barton <ideasman42@gmail.com>2011-03-10 16:49:46 +0300
committerCampbell Barton <ideasman42@gmail.com>2011-03-10 16:49:46 +0300
commit1c3679a5b05db2b4a83f25ad6434106293b2726f (patch)
treec5cdac0e860abe6067a73ba256e6b515bb63fdb8
parent188c4ae055393aa7495508d59c44870f072279d3 (diff)
fix [#26442] blender crash when turning off antialiasing fonts
ASCII lookup table wasn't being freed when when the rest of the glyphs were. Also found own bug where mesh stat text was using wrong sized array (char[3] as char[4]).
-rw-r--r--source/blender/blenfont/intern/blf_glyph.c2
-rw-r--r--source/blender/editors/space_view3d/drawobject.c4
2 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/blenfont/intern/blf_glyph.c b/source/blender/blenfont/intern/blf_glyph.c
index b9154951fb1..e165012f43e 100644
--- a/source/blender/blenfont/intern/blf_glyph.c
+++ b/source/blender/blenfont/intern/blf_glyph.c
@@ -135,6 +135,8 @@ void blf_glyph_cache_clear(FontBLF *font)
}
}
}
+
+ memset(font->glyph_ascii_table, 0, sizeof(font->glyph_ascii_table));
}
void blf_glyph_cache_free(GlyphCacheBLF *gc)
diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c
index bb298756927..bd3c140c647 100644
--- a/source/blender/editors/space_view3d/drawobject.c
+++ b/source/blender/editors/space_view3d/drawobject.c
@@ -663,7 +663,7 @@ void view3d_cached_text_draw_end(View3D *v3d, ARegion *ar, int depth_write, floa
col_pack_prev= vos->col.pack;
}
if(vos->flag & V3D_CACHE_TEXT_ASCII) {
- BLF_draw_default((float)vos->mval[0]+vos->xoffs, (float)vos->mval[1], (depth_write)? 0.0f: 2.0f, str, vos->str_len);
+ BLF_draw_default_ascii((float)vos->mval[0]+vos->xoffs, (float)vos->mval[1], (depth_write)? 0.0f: 2.0f, str, vos->str_len);
}
else {
BLF_draw_default((float)vos->mval[0]+vos->xoffs, (float)vos->mval[1], (depth_write)? 0.0f: 2.0f, str, vos->str_len);
@@ -2123,7 +2123,7 @@ static void draw_em_measure_stats(View3D *v3d, RegionView3D *rv3d, Object *ob, E
float fvec[3];
char val[32]; /* Stores the measurement display text here */
const char *conv_float; /* Use a float conversion matching the grid size */
- unsigned char col[3]; /* color of the text to draw */
+ unsigned char col[4]= {0, 0, 0, 255}; /* color of the text to draw */
float area; /* area of the face */
float grid= unit->system ? unit->scale_length : v3d->grid;
const int do_split= unit->flag & USER_UNIT_OPT_SPLIT;