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

This commit is contained in:
Nikolay Sivov 2015-05-31 15:11:56 +03:00 committed by Alexandre Julliard
parent 998af35a3e
commit 9351596538
1 changed files with 4 additions and 1 deletions

View File

@ -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);