[vlc-commits] freetype: fix cache/fontselect delete order

Francois Cartegnie git at videolan.org
Tue Aug 18 14:58:45 CEST 2020


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Tue Aug 18 14:51:40 2020 +0200| [d02466f8838c9ac68aab5eeb461321a9278e5eda] | committer: Francois Cartegnie

freetype: fix cache/fontselect delete order

Win32 still make calls to directwrite

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d02466f8838c9ac68aab5eeb461321a9278e5eda
---

 modules/text_renderer/freetype/freetype.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/modules/text_renderer/freetype/freetype.c b/modules/text_renderer/freetype/freetype.c
index a5f34547c3..36fa044f73 100644
--- a/modules/text_renderer/freetype/freetype.c
+++ b/modules/text_renderer/freetype/freetype.c
@@ -1465,6 +1465,12 @@ static void Destroy( vlc_object_t *p_this )
         DumpFamilies( p_sys->fs );
 #endif
 
+    if( p_sys->ftcache )
+        vlc_ftcache_Delete( p_sys->ftcache );
+
+    if( p_sys->fs )
+        FontSelectDelete( p_sys->fs );
+
     free( p_sys->psz_fontfile );
     free( p_sys->psz_monofontfile );
 
@@ -1481,16 +1487,10 @@ static void Destroy( vlc_object_t *p_this )
         free( p_sys->pp_font_attachments );
     }
 
-    if(p_sys->fs)
-        FontSelectDelete( p_sys->fs );
-
     /* Freetype */
     if( p_sys->p_stroker )
         FT_Stroker_Done( p_sys->p_stroker );
 
-    if( p_sys->ftcache )
-        vlc_ftcache_Delete( p_sys->ftcache );
-
     FT_Done_FreeType( p_sys->p_library );
 
     free( p_sys );



More information about the vlc-commits mailing list