=?UTF-8?Q?J=C3=B3zef=20Kucia=20?=: d3d11: Allow to pass NULL as "query" to d3d11_device_CreateQuery().
Alexandre Julliard
julliard at wine.codeweavers.com
Tue Apr 5 11:07:33 CDT 2016
Module: wine
Branch: master
Commit: 72e079d7a6c3c2a1d61b90c9427516db4d451684
URL: http://source.winehq.org/git/wine.git/?a=commit;h=72e079d7a6c3c2a1d61b90c9427516db4d451684
Author: Józef Kucia <jkucia at codeweavers.com>
Date: Tue Apr 5 10:22:04 2016 +0200
d3d11: Allow to pass NULL as "query" to d3d11_device_CreateQuery().
Signed-off-by: Józef Kucia <jkucia at codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/d3d11/device.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c
index 4e84dad..d1b817b 100644
--- a/dlls/d3d11/device.c
+++ b/dlls/d3d11/device.c
@@ -2486,9 +2486,14 @@ static HRESULT STDMETHODCALLTYPE d3d11_device_CreateQuery(ID3D11Device *iface,
if (FAILED(hr = d3d_query_create(device, desc, FALSE, &object)))
return hr;
- *query = &object->ID3D11Query_iface;
+ if (query)
+ {
+ *query = &object->ID3D11Query_iface;
+ return S_OK;
+ }
- return S_OK;
+ ID3D11Query_Release(&object->ID3D11Query_iface);
+ return S_FALSE;
}
static HRESULT STDMETHODCALLTYPE d3d11_device_CreatePredicate(ID3D11Device *iface, const D3D11_QUERY_DESC *desc,
More information about the wine-cvs
mailing list