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>
This commit is contained in:
parent
2ef42bd946
commit
261563f28e
|
@ -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 */
|
||||
|
|
Loading…
Reference in New Issue