[PATCH] dwrite: Handle bitmap allocation error when rendering to bitmap target
Nikolay Sivov
nsivov at codeweavers.com
Wed Jan 13 13:41:13 CST 2016
Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
---
dlls/dwrite/gdiinterop.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/dlls/dwrite/gdiinterop.c b/dlls/dwrite/gdiinterop.c
index ded3731..794ebee 100644
--- a/dlls/dwrite/gdiinterop.c
+++ b/dlls/dwrite/gdiinterop.c
@@ -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 */
--
2.6.4
More information about the wine-patches
mailing list