[vlc-devel] [PATCH] freetype/platform_fonts: Do not strdup NULL

Marvin Scholz epirat07 at gmail.com
Sat Jun 17 17:10:29 CEST 2017


Please disregard this patch, it is superseded by the following patches:

https://mailman.videolan.org/pipermail/vlc-devel/2017-June/113608.html

Sorry.

On 17 Jun 2017, at 14:05, Marvin Scholz wrote:

> ---
>  modules/text_renderer/freetype/platform_fonts.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/modules/text_renderer/freetype/platform_fonts.c 
> b/modules/text_renderer/freetype/platform_fonts.c
> index 4491f6dce5..2e6bfa431d 100644
> --- a/modules/text_renderer/freetype/platform_fonts.c
> +++ b/modules/text_renderer/freetype/platform_fonts.c
> @@ -572,8 +572,10 @@ char* Generic_Select( filter_t *p_filter, const 
> char* psz_family,
>      if( p_family && ( p_font = GetBestFont( p_filter, p_family, 
> b_bold,
>                                              b_italic, codepoint ) ) )
>      {
> -        *i_idx = p_font->i_index;
> -        return strdup( p_font->psz_fontfile );
> +        if (p_font->psz_fontfile) {
> +            *i_idx = p_font->i_index;
> +            return strdup( p_font->psz_fontfile );
> +        }
>      }
>
>      return File_Select( SYSTEM_DEFAULT_FONT_FILE );
> -- 
> 2.11.0 (Apple Git-81)


More information about the vlc-devel mailing list