Henri Verbeet : ddraw: Properly retrieve an interface pointer in ddraw_surface7_GetPalette().
Alexandre Julliard
julliard at winehq.org
Mon Apr 9 13:09:15 CDT 2012
Module: wine
Branch: master
Commit: 9d317e632fb6d2388d3de30f67774704216c7e07
URL: http://source.winehq.org/git/wine.git/?a=commit;h=9d317e632fb6d2388d3de30f67774704216c7e07
Author: Henri Verbeet <hverbeet at codeweavers.com>
Date: Sun Apr 8 19:13:24 2012 +0200
ddraw: Properly retrieve an interface pointer in ddraw_surface7_GetPalette().
---
dlls/ddraw/surface.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/dlls/ddraw/surface.c b/dlls/ddraw/surface.c
index 49d6953..95ee9c1 100644
--- a/dlls/ddraw/surface.c
+++ b/dlls/ddraw/surface.c
@@ -4467,6 +4467,7 @@ static HRESULT WINAPI ddraw_surface7_GetPalette(IDirectDrawSurface7 *iface, IDir
{
struct ddraw_surface *surface = impl_from_IDirectDrawSurface7(iface);
struct wined3d_palette *wined3d_palette;
+ struct ddraw_palette *palette_impl;
HRESULT hr = DD_OK;
TRACE("iface %p, palette %p.\n", iface, Pal);
@@ -4478,7 +4479,8 @@ static HRESULT WINAPI ddraw_surface7_GetPalette(IDirectDrawSurface7 *iface, IDir
wined3d_palette = wined3d_surface_get_palette(surface->wined3d_surface);
if (wined3d_palette)
{
- *Pal = wined3d_palette_get_parent(wined3d_palette);
+ palette_impl = wined3d_palette_get_parent(wined3d_palette);
+ *Pal = &palette_impl->IDirectDrawPalette_iface;
IDirectDrawPalette_AddRef(*Pal);
}
else
More information about the wine-cvs
mailing list