[vlc-devel] commit: freetype: initialise variable and check fontmatch pointer ( Ilkka Ollakka )
git version control
git at videolan.org
Thu Jul 30 13:37:05 CEST 2009
vlc | branch: master | Ilkka Ollakka <ileoo at videolan.org> | Thu Jul 30 14:32:48 2009 +0300| [591325109e9eb881820b9ddd213853153e933129] | committer: Ilkka Ollakka
freetype: initialise variable and check fontmatch pointer
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=591325109e9eb881820b9ddd213853153e933129
---
modules/misc/freetype.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/modules/misc/freetype.c b/modules/misc/freetype.c
index f77cdc4..0171d48 100644
--- a/modules/misc/freetype.c
+++ b/modules/misc/freetype.c
@@ -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;
More information about the vlc-devel
mailing list