Hi all,
This patch fixes a problem that appeared in Mafia. Before this function
crashed when pDirtyRect was null. According to MSDN D3DERR_INVALIDCALL should
be returned in case of problems.
Regards,
Roderick Colenbrander
Index: dlls/d3d8/surface.c
===================================================================
RCS file: /home/wine/wine/dlls/d3d8/surface.c,v
retrieving revision 1.15
diff -u -r1.15 surface.c
--- dlls/d3d8/surface.c 4 Jun 2003 23:05:46 -0000 1.15
+++ dlls/d3d8/surface.c 6 Jun 2003 16:48:56 -0000
@@ -603,6 +603,10 @@
*/
extern HRESULT WINAPI IDirect3DSurface8Impl_AddDirtyRect(LPDIRECT3DSURFACE8 iface, CONST RECT* pDirtyRect) {
ICOM_THIS(IDirect3DSurface8Impl,iface);
+
+ if(pDirtyRect == NULL)
+ return D3DERR_INVALIDCALL;
+
This->Dirty = TRUE;
This->dirtyRect.left = min(This->dirtyRect.left, pDirtyRect->left);
This->dirtyRect.top = min(This->dirtyRect.top, pDirtyRect->top);