dwrite: Handle bitmap allocation error when rendering to bitmap target.

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
oldstable
Nikolay Sivov 2016-01-13 22:41:13 +03:00 committed by Alexandre Julliard
parent 2ef42bd946
commit 261563f28e
1 changed files with 5 additions and 0 deletions

View File

@ -422,6 +422,11 @@ static HRESULT WINAPI rendertarget_DrawGlyphRun(IDWriteBitmapRenderTarget1 *ifac
if (texturetype == DWRITE_TEXTURE_CLEARTYPE_3x1)
size *= 3;
bitmap = heap_alloc_zero(size);
if (!bitmap) {
IDWriteGlyphRunAnalysis_Release(analysis);
return E_OUTOFMEMORY;
}
hr = IDWriteGlyphRunAnalysis_CreateAlphaTexture(analysis, texturetype, &target, bitmap, size);
if (hr == S_OK) {
/* blit to target dib */