From 0d7dbbb6e1fc0bb85d236ca1e04ff966f4ad39c9 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Fri, 28 Jun 2013 13:05:15 +0000 Subject: Fix #35884: crash opening .blend with generated color grid image and preview render. Printing text on the color grid image would initialize font glyphs from a thread at the same time as the UI, causing conflicts. The freetype glyph renderer needs to be mutex locked because it uses a shared buffer internally even when rendering for different fonts. Also needed to change the image generate function to use the render monospace font to avoid conflicts in blenfont. What's still weak in the blenfont API is that there is no distinction between a font and a thread using that font to render with some particular size, style, etc. --- source/blender/blenkernel/intern/image_gen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/blenkernel/intern/image_gen.c') diff --git a/source/blender/blenkernel/intern/image_gen.c b/source/blender/blenkernel/intern/image_gen.c index c31ec593e54..eda22a095ef 100644 --- a/source/blender/blenkernel/intern/image_gen.c +++ b/source/blender/blenkernel/intern/image_gen.c @@ -287,7 +287,7 @@ static void checker_board_text(unsigned char *rect, float *rect_float, int width int x, y; int pen_x, pen_y; char text[3] = {'A', '1', '\0'}; - const int mono = blf_mono_font; + const int mono = blf_mono_font_render; BLF_size(mono, 54, 72); /* hard coded size! */ -- cgit v1.2.3