ddraw: The surface isn't allowed to be NULL in EnumSurfacesCallbackThunk() and EnumCallback().
This commit is contained in:
parent
5bf9dd902c
commit
1edda50c03
|
@ -578,9 +578,8 @@ EnumSurfacesCallbackThunk(LPDIRECTDRAWSURFACE7 pSurf, LPDDSURFACEDESC2 pDDSD,
|
||||||
|
|
||||||
/* This coercion is safe, since the IDirectDrawSurface3 vtable has the
|
/* This coercion is safe, since the IDirectDrawSurface3 vtable has the
|
||||||
* IDirectDrawSurface vtable layout at the beginning */
|
* IDirectDrawSurface vtable layout at the beginning */
|
||||||
return cbcontext->func(
|
return cbcontext->func((IDirectDrawSurface *)&((IDirectDrawSurfaceImpl *)pSurf)->IDirectDrawSurface3_vtbl,
|
||||||
pSurf ? (IDirectDrawSurface *)&((IDirectDrawSurfaceImpl *)pSurf)->IDirectDrawSurface3_vtbl : NULL,
|
(DDSURFACEDESC *)pDDSD, cbcontext->context);
|
||||||
(LPDDSURFACEDESC)pDDSD, cbcontext->context);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI
|
static HRESULT WINAPI
|
||||||
|
|
|
@ -150,9 +150,8 @@ EnumCallback(LPDIRECTDRAWSURFACE7 iface, LPDDSURFACEDESC2 pDDSD,
|
||||||
{
|
{
|
||||||
const struct callback_info* info = context;
|
const struct callback_info* info = context;
|
||||||
|
|
||||||
return info->callback(iface ?
|
return info->callback((IDirectDrawSurface *)&((IDirectDrawSurfaceImpl *)iface)->IDirectDrawSurface3_vtbl,
|
||||||
(IDirectDrawSurface *)&((IDirectDrawSurfaceImpl *)iface)->IDirectDrawSurface3_vtbl : NULL,
|
(DDSURFACEDESC *)pDDSD, info->context);
|
||||||
(LPDDSURFACEDESC)pDDSD, info->context);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI
|
static HRESULT WINAPI
|
||||||
|
|
Loading…
Reference in New Issue