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.
This commit is contained in:
jp9000 2016-04-22 08:23:16 -07:00
parent 737a66cb39
commit 42305f1c98

View file

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