Commit 5a48acc6 authored by Oliver Stieber's avatar Oliver Stieber Committed by Alexandre Julliard

Allow NULL ppQuery to be passed to CreateQuery.

parent e2b8b43b
......@@ -125,6 +125,9 @@ HRESULT WINAPI IDirect3DDevice9Impl_CreateQuery(LPDIRECT3DDEVICE9 iface, D3DQUER
TRACE("(%p) Relay\n", This);
if (!ppQuery)
return IWineD3DDevice_CreateQuery(This->WineD3DDevice, Type, NULL, NULL);
/* Allocate the storage for the device */
object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirect3DQuery9Impl));
if (NULL == object) {
......@@ -135,7 +138,7 @@ HRESULT WINAPI IDirect3DDevice9Impl_CreateQuery(LPDIRECT3DDEVICE9 iface, D3DQUER
object->lpVtbl = &Direct3DQuery9_Vtbl;
object->ref = 1;
hr = IWineD3DDevice_CreateQuery(This->WineD3DDevice, Type, &(object->wineD3DQuery), (IUnknown*)object);
hr = IWineD3DDevice_CreateQuery(This->WineD3DDevice, Type, &object->wineD3DQuery, (IUnknown *)object);
if (FAILED(hr)) {
/* free up object */
......@@ -145,6 +148,6 @@ HRESULT WINAPI IDirect3DDevice9Impl_CreateQuery(LPDIRECT3DDEVICE9 iface, D3DQUER
} else {
*ppQuery = (LPDIRECT3DQUERY9) object;
}
TRACE("(%p) : returning %p \n", This, *ppQuery);
TRACE("(%p) : returning %lx\n", This, hr);
return hr;
}
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