Commit 93515965 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

dwrite: Fix potential null pointer dereference in GetInlineObject() (Coverity).

parent 998af35a
......@@ -2016,8 +2016,11 @@ static HRESULT WINAPI dwritetextlayout_GetInlineObject(IDWriteTextLayout2 *iface
TRACE("(%p)->(%u %p %p)\n", This, position, object, r);
if (position >= This->len)
return S_OK;
range = get_layout_range_by_pos(This, position);
*object = range ? range->object : NULL;
*object = range->object;
if (*object)
IDWriteInlineObject_AddRef(*object);
......
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