mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-20 09:16:16 +00:00
dwrite: Handle allocation error (Coverity).
This commit is contained in:
parent
13d99144bd
commit
0e179e08b6
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue