Commit 0e179e08 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

dwrite: Handle allocation error (Coverity).

parent 13d99144
......@@ -930,6 +930,13 @@ HRESULT create_font_from_logfont(const LOGFONTW *logfont, IDWriteFont **font)
ret = GetOutlineTextMetricsW(hdc, 0, NULL);
otm = heap_alloc(ret);
if (!otm)
{
heap_free(This);
DeleteDC(hdc);
DeleteObject(hfont);
return E_OUTOFMEMORY;
}
otm->otmSize = ret;
ret = GetOutlineTextMetricsW(hdc, otm->otmSize, otm);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment