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

commit be8446588339ad3fb73dc4acc92766813abdfd41
Author:     Katayama Hirofumi MZ <katayama.hirofumi...@gmail.com>
AuthorDate: Tue Dec 25 21:51:58 2018 +0900
Commit:     Katayama Hirofumi MZ <katayama.hirofumi...@gmail.com>
CommitDate: Tue Dec 25 21:54:33 2018 +0900

    [FONT][WIN32SS] Follow-up of #1184
---
 win32ss/gdi/ntgdi/freetype.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/win32ss/gdi/ntgdi/freetype.c b/win32ss/gdi/ntgdi/freetype.c
index 85ad7ceb46..0bdc40719a 100644
--- a/win32ss/gdi/ntgdi/freetype.c
+++ b/win32ss/gdi/ntgdi/freetype.c
@@ -5813,10 +5813,13 @@ GreExtTextOutW(
         {
             glyph_index = get_glyph_index_flagged(face, String[i], 
ETO_GLYPH_INDEX, fuOptions);
 
+            // FIXME: Use FT_LOAD_BITMAP_METRICS_ONLY or cache.
             error = FT_Load_Glyph(face, glyph_index, FT_LOAD_DEFAULT);
             if (error)
             {
-                DPRINT1("WARNING: Failed to load and render glyph! [index: 
%d]\n", glyph_index);
+                DPRINT1("Failed to load glyph! [index: %d]\n", glyph_index);
+                IntUnLockFreeType();
+                goto Cleanup;
             }
 
             glyph = face->glyph;
@@ -5828,6 +5831,8 @@ GreExtTextOutW(
             if (!realglyph)
             {
                 DPRINT1("Failed to render glyph! [index: %d]\n", glyph_index);
+                IntUnLockFreeType();
+                goto Cleanup;
             }
 
             /* retrieve kerning distance and move pen position */

Reply via email to