dwrite: Fixed NULL ptr deref before check (Coverity).
This commit is contained in:
parent
23aaef96a2
commit
90774871c8
|
@ -390,9 +390,9 @@ static HRESULT WINAPI dwritefontface_TryGetFontTable(IDWriteFontFace *iface, UIN
|
||||||
TRACE("(%p)->(%u %p %p %p %p)\n", This, table_tag, table_data, table_size, context, exists);
|
TRACE("(%p)->(%u %p %p %p %p)\n", This, table_tag, table_data, table_size, context, exists);
|
||||||
|
|
||||||
table = heap_alloc(sizeof(struct dwrite_fonttable));
|
table = heap_alloc(sizeof(struct dwrite_fonttable));
|
||||||
table->magic = DWRITE_FONTTABLE_MAGIC;
|
|
||||||
if (!table)
|
if (!table)
|
||||||
return E_OUTOFMEMORY;
|
return E_OUTOFMEMORY;
|
||||||
|
table->magic = DWRITE_FONTTABLE_MAGIC;
|
||||||
|
|
||||||
*exists = FALSE;
|
*exists = FALSE;
|
||||||
for (i = 0; i < This->data->file_count && !(*exists); i++)
|
for (i = 0; i < This->data->file_count && !(*exists); i++)
|
||||||
|
|
Loading…
Reference in New Issue