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