Commit 59132510 authored by Ilkka Ollakka's avatar Ilkka Ollakka

freetype: initialise variable and check fontmatch pointer

parent ca4d2fc9
......@@ -298,7 +298,7 @@ static int Create( vlc_object_t *p_this )
#ifdef HAVE_FONTCONFIG
FcPattern *fontpattern, *fontmatch;
FcResult fontresult;
FcResult fontresult = FcResultNoMatch;
#endif
......@@ -366,7 +366,7 @@ static int Create( vlc_object_t *p_this )
FcDefaultSubstitute( fontpattern );
fontmatch = FcFontMatch( NULL, fontpattern, &fontresult );
if( fontresult == FcResultNoMatch )
if( !fontmatch || fontresult == FcResultNoMatch )
{
FcPatternDestroy( fontpattern );
goto error;
......
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