From 90774871c844e2bb39b8d6350f48b4a12ede1ccd Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Sun, 21 Sep 2014 14:44:43 +0200 Subject: [PATCH] dwrite: Fixed NULL ptr deref before check (Coverity). --- dlls/dwrite/font.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/dwrite/font.c b/dlls/dwrite/font.c index efa305e0d94..6e7de467f8b 100644 --- a/dlls/dwrite/font.c +++ b/dlls/dwrite/font.c @@ -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); table = heap_alloc(sizeof(struct dwrite_fonttable)); - table->magic = DWRITE_FONTTABLE_MAGIC; if (!table) return E_OUTOFMEMORY; + table->magic = DWRITE_FONTTABLE_MAGIC; *exists = FALSE; for (i = 0; i < This->data->file_count && !(*exists); i++)