Commit 6f99f196 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

dwrite: Fix potential null pointer access in GetFontCollection() (Coverity).

parent 1d08eb28
......@@ -1863,8 +1863,11 @@ static HRESULT WINAPI dwritetextlayout_layout_GetFontCollection(IDWriteTextLayou
TRACE("(%p)->(%u %p %p)\n", This, position, collection, r);
if (position >= This->len)
return S_OK;
range = get_layout_range_by_pos(This, position);
*collection = range ? range->collection : NULL;
*collection = range->collection;
if (*collection)
IDWriteFontCollection_AddRef(*collection);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment