Browse Source

freetype: fix memory leak when dealing with empty texts

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
pull/42/head
Hannes Domani 10 years ago
committed by Jean-Baptiste Kempf
parent
commit
bc1ee6cf54
  1. 2
      modules/text_renderer/freetype/freetype.c

2
modules/text_renderer/freetype/freetype.c

@ -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 );

Loading…
Cancel
Save