Henri Verbeet : d3d8: Properly retrieve an interface pointer in IDirect3DDevice8Impl_GetIndices( ).
Alexandre Julliard
julliard at winehq.org
Tue Apr 24 13:14:40 CDT 2012
Module: wine
Branch: master
Commit: 53e9cf8ab4ada3786ebb01c0ebae49565e49af49
URL: http://source.winehq.org/git/wine.git/?a=commit;h=53e9cf8ab4ada3786ebb01c0ebae49565e49af49
Author: Henri Verbeet <hverbeet at codeweavers.com>
Date: Mon Apr 23 21:24:53 2012 +0200
d3d8: Properly retrieve an interface pointer in IDirect3DDevice8Impl_GetIndices().
---
dlls/d3d8/device.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/dlls/d3d8/device.c b/dlls/d3d8/device.c
index 7d7b454..3dfd8f4 100644
--- a/dlls/d3d8/device.c
+++ b/dlls/d3d8/device.c
@@ -2383,6 +2383,7 @@ static HRESULT WINAPI IDirect3DDevice8Impl_GetIndices(IDirect3DDevice8 *iface,
{
IDirect3DDevice8Impl *This = impl_from_IDirect3DDevice8(iface);
struct wined3d_buffer *retIndexData = NULL;
+ IDirect3DIndexBuffer8Impl *buffer_impl;
HRESULT hr;
TRACE("iface %p, buffer %p, base_vertex_index %p.\n", iface, ppIndexData, pBaseVertexIndex);
@@ -2397,7 +2398,8 @@ static HRESULT WINAPI IDirect3DDevice8Impl_GetIndices(IDirect3DDevice8 *iface,
hr = wined3d_device_get_index_buffer(This->wined3d_device, &retIndexData);
if (SUCCEEDED(hr) && retIndexData)
{
- *ppIndexData = wined3d_buffer_get_parent(retIndexData);
+ buffer_impl = wined3d_buffer_get_parent(retIndexData);
+ *ppIndexData = &buffer_impl->IDirect3DIndexBuffer8_iface;
IDirect3DIndexBuffer8_AddRef(*ppIndexData);
wined3d_buffer_decref(retIndexData);
} else {
More information about the wine-cvs
mailing list