dwrite: Check correct variable for NULL (Coverity).

This commit is contained in:
Marcus Meissner 2014-09-23 08:45:12 +02:00 committed by Alexandre Julliard
parent b12381a04a
commit 50c8766cce
1 changed files with 2 additions and 2 deletions

View File

@ -1049,7 +1049,7 @@ static HRESULT create_fontfamily(IDWriteLocalizedStrings *familyname, IDWriteFon
This = heap_alloc(sizeof(struct dwrite_fontfamily));
if (!This) return E_OUTOFMEMORY;
This->data = heap_alloc(sizeof(struct dwrite_fontfamily_data));
if (!This)
if (!This->data)
{
heap_free(This);
return E_OUTOFMEMORY;
@ -1346,7 +1346,7 @@ HRESULT font_create_fontface(IDWriteFactory *iface, DWRITE_FONT_FACE_TYPE facety
This = heap_alloc(sizeof(struct dwrite_fontface));
if (!This) return E_OUTOFMEMORY;
This->data = heap_alloc(sizeof(struct dwrite_fontface_data));
if (!This)
if (!This->data)
{
heap_free(This);
return E_OUTOFMEMORY;