https://git.reactos.org/?p=reactos.git;a=commitdiff;h=971c657b80fd4eb684a98…
commit 971c657b80fd4eb684a983a5dc9be217e9fe6845
Author: Mark Jansen <mark.jansen(a)reactos.org>
AuthorDate: Sat Dec 29 19:46:14 2018 +0100
Commit: Mark Jansen <mark.jansen(a)reactos.org>
CommitDate: Sat Dec 29 19:47:00 2018 +0100
[FONT][WIN32SS] Hold the freetype lock while accessing freetype data
---
win32ss/gdi/ntgdi/freetype.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/win32ss/gdi/ntgdi/freetype.c b/win32ss/gdi/ntgdi/freetype.c
index 08d164a2eb..93abca4f90 100644
--- a/win32ss/gdi/ntgdi/freetype.c
+++ b/win32ss/gdi/ntgdi/freetype.c
@@ -6798,8 +6798,12 @@ NtGdiGetGlyphIndicesW(
FT_Face Face = FontGDI->SharedFace->Face;
if (FT_IS_SFNT(Face))
{
- TT_OS2 *pOS2 = FT_Get_Sfnt_Table(Face, ft_sfnt_os2);
+ TT_OS2 *pOS2;
+
+ IntLockFreeType();
+ pOS2 = FT_Get_Sfnt_Table(Face, ft_sfnt_os2);
DefChar = (pOS2->usDefaultChar ? get_glyph_index(Face,
pOS2->usDefaultChar) : 0);
+ IntUnLockFreeType();
}
else
{