dwrite: Fix potential null pointer dereference in GetInlineObject() (Coverity).
This commit is contained in:
parent
998af35a3e
commit
9351596538
|
@ -2016,8 +2016,11 @@ static HRESULT WINAPI dwritetextlayout_GetInlineObject(IDWriteTextLayout2 *iface
|
||||||
|
|
||||||
TRACE("(%p)->(%u %p %p)\n", This, position, object, r);
|
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);
|
range = get_layout_range_by_pos(This, position);
|
||||||
*object = range ? range->object : NULL;
|
*object = range->object;
|
||||||
if (*object)
|
if (*object)
|
||||||
IDWriteInlineObject_AddRef(*object);
|
IDWriteInlineObject_AddRef(*object);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue