Module: wine Branch: master Commit: 1edda50c03cfce6f6f1e79fbbab88e41c1441b21 URL: http://source.winehq.org/git/wine.git/?a=commit;h=1edda50c03cfce6f6f1e79fbba...
Author: Henri Verbeet hverbeet@codeweavers.com Date: Mon Jul 19 12:47:59 2010 +0200
ddraw: The surface isn't allowed to be NULL in EnumSurfacesCallbackThunk() and EnumCallback().
---
dlls/ddraw/ddraw_thunks.c | 5 ++--- dlls/ddraw/surface_thunks.c | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/dlls/ddraw/ddraw_thunks.c b/dlls/ddraw/ddraw_thunks.c index 28991d1..2c205e9 100644 --- a/dlls/ddraw/ddraw_thunks.c +++ b/dlls/ddraw/ddraw_thunks.c @@ -578,9 +578,8 @@ EnumSurfacesCallbackThunk(LPDIRECTDRAWSURFACE7 pSurf, LPDDSURFACEDESC2 pDDSD,
/* This coercion is safe, since the IDirectDrawSurface3 vtable has the * IDirectDrawSurface vtable layout at the beginning */ - return cbcontext->func( - pSurf ? (IDirectDrawSurface *)&((IDirectDrawSurfaceImpl *)pSurf)->IDirectDrawSurface3_vtbl : NULL, - (LPDDSURFACEDESC)pDDSD, cbcontext->context); + return cbcontext->func((IDirectDrawSurface *)&((IDirectDrawSurfaceImpl *)pSurf)->IDirectDrawSurface3_vtbl, + (DDSURFACEDESC *)pDDSD, cbcontext->context); }
static HRESULT WINAPI diff --git a/dlls/ddraw/surface_thunks.c b/dlls/ddraw/surface_thunks.c index be57c3b..6df6dcd 100644 --- a/dlls/ddraw/surface_thunks.c +++ b/dlls/ddraw/surface_thunks.c @@ -150,9 +150,8 @@ EnumCallback(LPDIRECTDRAWSURFACE7 iface, LPDDSURFACEDESC2 pDDSD, { const struct callback_info* info = context;
- return info->callback(iface ? - (IDirectDrawSurface *)&((IDirectDrawSurfaceImpl *)iface)->IDirectDrawSurface3_vtbl : NULL, - (LPDDSURFACEDESC)pDDSD, info->context); + return info->callback((IDirectDrawSurface *)&((IDirectDrawSurfaceImpl *)iface)->IDirectDrawSurface3_vtbl, + (DDSURFACEDESC *)pDDSD, info->context); }
static HRESULT WINAPI