Akihiro Sagawa : opengl32: Fix empty glyph handling.

Alexandre Julliard julliard at winehq.org
Tue Sep 24 03:22:01 CDT 2013


Module: wine
Branch: master
Commit: 33e05eb6c5cce89b22fa779deacfeb2b415e7f19
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=33e05eb6c5cce89b22fa779deacfeb2b415e7f19

Author: Akihiro Sagawa <sagawa.aki at gmail.com>
Date:   Fri Sep 20 00:57:50 2013 +0900

opengl32: Fix empty glyph handling.

---

 dlls/opengl32/wgl.c |   14 +++++++++-----
 1 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/dlls/opengl32/wgl.c b/dlls/opengl32/wgl.c
index 1317ff5..361a1ec 100644
--- a/dlls/opengl32/wgl.c
+++ b/dlls/opengl32/wgl.c
@@ -1121,11 +1121,15 @@ static BOOL wglUseFontBitmaps_common( HDC hdc, DWORD first, DWORD count, DWORD l
              bitmap = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, size);
              gl_bitmap = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, size);
          }
-         if (unicode)
-             ret = (GetGlyphOutlineW(hdc, glyph, GGO_BITMAP, &gm, size, bitmap, &identity) != GDI_ERROR);
-         else
-             ret = (GetGlyphOutlineA(hdc, glyph, GGO_BITMAP, &gm, size, bitmap, &identity) != GDI_ERROR);
-         if (!ret) break;
+         if (needed_size != 0) {
+             if (unicode)
+                 ret = (GetGlyphOutlineW(hdc, glyph, GGO_BITMAP, &gm,
+                                         size, bitmap, &identity) != GDI_ERROR);
+             else
+                 ret = (GetGlyphOutlineA(hdc, glyph, GGO_BITMAP, &gm,
+                                         size, bitmap, &identity) != GDI_ERROR);
+             if (!ret) break;
+         }
 
          if (TRACE_ON(wgl)) {
              unsigned int bitmask;




More information about the wine-cvs mailing list