Commit bc1ee6cf authored by ssbssa's avatar ssbssa Committed by Jean-Baptiste Kempf

freetype: fix memory leak when dealing with empty texts

Signed-off-by: Jean-Baptiste Kempf's avatarJean-Baptiste Kempf <jb@videolan.org>
parent e9228cad
......@@ -988,7 +988,7 @@ static uni_char_t* SegmentsToTextAndStyles( filter_t *p_filter, const text_segme
*pi_styles = 0;
for( const text_segment_t *s = p_segment; s != NULL; s = s->p_next )
{
if( !s->psz_text )
if( !s->psz_text || !s->psz_text[0] )
continue;
size_t i_string_bytes = 0;
uni_char_t *psz_tmp = ToCharset( FREETYPE_TO_UCS, s->psz_text, &i_string_bytes );
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment