From 310a3b1d11bd175ee1182b0e37812fd140a7b6b4 Mon Sep 17 00:00:00 2001 From: Akihiro Sagawa Date: Fri, 20 Sep 2013 00:57:48 +0900 Subject: [PATCH] winex11.drv: Fix empty glyph handling. --- dlls/winex11.drv/xrender.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dlls/winex11.drv/xrender.c b/dlls/winex11.drv/xrender.c index 671f67aaed4..ca2d3daf589 100644 --- a/dlls/winex11.drv/xrender.c +++ b/dlls/winex11.drv/xrender.c @@ -1129,7 +1129,10 @@ static void UploadGlyph(struct xrender_physdev *physDev, UINT glyph, enum glyph_ buf = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, buflen); - GetGlyphOutlineW(physDev->dev.hdc, glyph, ggo_format, &gm, buflen, buf, &identity); + if (buflen) + GetGlyphOutlineW(physDev->dev.hdc, glyph, ggo_format, &gm, buflen, buf, &identity); + else + gm.gmBlackBoxX = gm.gmBlackBoxY = 0; /* empty glyph */ formatEntry->realized[glyph] = TRUE; TRACE("buflen = %d. Got metrics: %dx%d adv=%d,%d origin=%d,%d\n",