Description: bugfix segmentation fault when using duplicated font
 If a font object was created with the same font description as another font
 created previously, the new duplicated font was not properly created: NULL
 was returned. This patch fixes the duplicated font creation.
Origin: upstream, http://cnbisrv02.epfl.ch/cgit/drawtk.git/commit/?id=573b3b
Author: Nicolas Bourdaud <nicolas.bourdaud@gmail.com>
Last-Update: 2012-06-14
Applied-Upstream: yes
--- a/src/fonttex.c
+++ b/src/fonttex.c
@@ -256,7 +256,8 @@
 
 	// Load the font bitmap
 	pthread_mutex_lock(&(tex->lock));
-	if (!tex->data) {
+	font = tex->aux;
+	if (!font) {
 		if ( ((font = malloc(sizeof(struct dtk_font))) == NULL)
 		    || alloc_image_data(tex, MAPWIDTH, MAPHEIGHT,
 		                             FONT_MXLVL, 8) )
