dwrite: Font collection pointer is never null when creating text format.
This commit is contained in:
parent
bbe6655280
commit
f4e3005645
|
@ -1972,14 +1972,8 @@ HRESULT create_textformat(const WCHAR *family_name, IDWriteFontCollection *colle
|
||||||
This->format.trimming.delimiter = 0;
|
This->format.trimming.delimiter = 0;
|
||||||
This->format.trimming.delimiterCount = 0;
|
This->format.trimming.delimiterCount = 0;
|
||||||
This->format.trimmingsign = NULL;
|
This->format.trimmingsign = NULL;
|
||||||
|
This->format.collection = collection;
|
||||||
if (collection)
|
IDWriteFontCollection_AddRef(collection);
|
||||||
{
|
|
||||||
This->format.collection = collection;
|
|
||||||
IDWriteFontCollection_AddRef(collection);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
ERR("Collection should always be set\n");
|
|
||||||
|
|
||||||
*format = (IDWriteTextFormat*)&This->IDWriteTextFormat1_iface;
|
*format = (IDWriteTextFormat*)&This->IDWriteTextFormat1_iface;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue