d3d11: Allow to pass NULL as "predicate" to d3d11_device_CreatePredicate().

Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Józef Kucia 2016-04-05 10:22:05 +02:00 committed by Alexandre Julliard
parent 72e079d7a6
commit 82391da960
1 changed files with 7 additions and 2 deletions

View File

@ -2508,9 +2508,14 @@ static HRESULT STDMETHODCALLTYPE d3d11_device_CreatePredicate(ID3D11Device *ifac
if (FAILED(hr = d3d_query_create(device, desc, TRUE, &object)))
return hr;
*predicate = (ID3D11Predicate *)&object->ID3D11Query_iface;
if (predicate)
{
*predicate = (ID3D11Predicate *)&object->ID3D11Query_iface;
return S_OK;
}
return S_OK;
ID3D11Query_Release(&object->ID3D11Query_iface);
return S_FALSE;
}
static HRESULT STDMETHODCALLTYPE d3d11_device_CreateCounter(ID3D11Device *iface, const D3D11_COUNTER_DESC *desc,