[vlc-commits] freetype: fix null deref on failed font select instance
Francois Cartegnie
git at videolan.org
Mon Aug 3 10:54:23 CEST 2020
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Wed Jul 29 16:54:42 2020 +0200| [22f402750a3572c1fcf593a423fa6c3ea49ebb35] | committer: Francois Cartegnie
freetype: fix null deref on failed font select instance
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=22f402750a3572c1fcf593a423fa6c3ea49ebb35
---
modules/text_renderer/freetype/freetype.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/modules/text_renderer/freetype/freetype.c b/modules/text_renderer/freetype/freetype.c
index 020aa03f43..26dd7ae354 100644
--- a/modules/text_renderer/freetype/freetype.c
+++ b/modules/text_renderer/freetype/freetype.c
@@ -1454,7 +1454,8 @@ static void Destroy( vlc_object_t *p_this )
filter_sys_t *p_sys = p_filter->p_sys;
#ifdef DEBUG_PLATFORM_FONTS
- DumpFamilies( p_sys->fs );
+ if(p_sys->fs)
+ DumpFamilies( p_sys->fs );
#endif
free( p_sys->psz_fontfile );
@@ -1476,7 +1477,8 @@ static void Destroy( vlc_object_t *p_this )
free( p_sys->pp_font_attachments );
}
- FontSelectDelete( p_sys->fs );
+ if(p_sys->fs)
+ FontSelectDelete( p_sys->fs );
/* Freetype */
if( p_sys->p_stroker )
More information about the vlc-commits
mailing list