https://git.reactos.org/?p=reactos.git;a=commitdiff;h=1d1b7f46fced1977da19732c61158a3085f3b919

commit 1d1b7f46fced1977da19732c61158a3085f3b919
Author:     Mark Jansen <[email protected]>
AuthorDate: Sat Dec 29 19:45:21 2018 +0100
Commit:     Mark Jansen <[email protected]>
CommitDate: Sat Dec 29 19:47:00 2018 +0100

    [FONT][WIN32SS] Hold the freetype lock while accessing freetype data
---
 win32ss/gdi/ntgdi/freetype.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/win32ss/gdi/ntgdi/freetype.c b/win32ss/gdi/ntgdi/freetype.c
index 7e7e132285..58a81dc2b6 100644
--- a/win32ss/gdi/ntgdi/freetype.c
+++ b/win32ss/gdi/ntgdi/freetype.c
@@ -4865,6 +4865,9 @@ IntFontType(PFONTGDI Font)
     FT_ULong tmp_size = 0;
     FT_Face Face = Font->SharedFace->Face;
 
+    ASSERT_FREETYPE_LOCK_NOT_HELD();
+    IntLockFreeType();
+
     if (FT_HAS_MULTIPLE_MASTERS(Face))
         Font->FontObj.flFontType |= FO_MULTIPLEMASTER;
     if (FT_HAS_VERTICAL(Face))
@@ -4886,6 +4889,8 @@ IntFontType(PFONTGDI Font)
     {
         Font->FontObj.flFontType |= (FO_CFF|FO_POSTSCRIPT);
     }
+
+    IntUnLockFreeType();
 }
 
 static BOOL

Reply via email to