Переглянути джерело

text-freetype2: Don't draw anything if no text to draw

Under certain circumstances (when there's no text and a filter is
applied for example) the freetype 2 text source would still draw.
jp9000 9 роки тому
батько
коміт
42305f1c98
1 змінених файлів з 1 додано та 0 видалено
  1. 1 0
      plugins/text-freetype2/text-freetype2.c

+ 1 - 0
plugins/text-freetype2/text-freetype2.c

@@ -201,6 +201,7 @@ static void ft2_source_render(void *data, gs_effect_t *effect)
 	if (srcdata == NULL) return;
 	if (srcdata == NULL) return;
 
 
 	if (srcdata->tex == NULL || srcdata->vbuf == NULL) return;
 	if (srcdata->tex == NULL || srcdata->vbuf == NULL) return;
+	if (srcdata->text == NULL || *srcdata->text == 0) return;
 
 
 	gs_reset_blend_state();
 	gs_reset_blend_state();
 	if (srcdata->outline_text) draw_outlines(srcdata);
 	if (srcdata->outline_text) draw_outlines(srcdata);