[d3d8] check that pstream is not null
Carlos Lozano
clozano at andago.com
Fri Feb 4 17:18:01 CST 2005
El vie, 04 de feb de 2005, a las 22:47, Ann and Jason Edmeades wrote:
> Firstly your change to check the *pStream is perfect correct - Can you send
> it to the patches, against d3d8 and double check if the same fix is needed
> in wined3d getstreamsource.
Regards,
Carlos.
--
___ _ \ | / Consulting
| . |._ _ _| | ___ ___ ___ http://www.andago.com
| || ' |/ . |<_> |/ . |/ . \__ GNU/Linux
|_|_||_|_|\___|<___|\_. |\___/ _ \ __|\ \ /
Carlos A. Lozano <___'/ | \ -_) __/\__ \ > < -_)
[ carlos.lozano at andago.com ]\___|_| ____/ _/\_\___|
[ calb at epsxe.com ] http://www.ePSXe.com
-------------- next part --------------
Index: dlls/d3d8/device.c
===================================================================
RCS file: /home/wine/wine/dlls/d3d8/device.c,v
retrieving revision 1.122
diff -u -r1.122 device.c
--- dlls/d3d8/device.c 24 Jan 2005 12:43:26 -0000 1.122
+++ dlls/d3d8/device.c 4 Feb 2005 23:09:33 -0000
@@ -4344,7 +4391,7 @@
TRACE("(%p) : StreamNo: %d, Stream (%p), Stride %d\n", This, StreamNumber, This->StateBlock->stream_source[StreamNumber], This->StateBlock->stream_stride[StreamNumber]);
*pStream = This->StateBlock->stream_source[StreamNumber];
*pStride = This->StateBlock->stream_stride[StreamNumber];
- IDirect3DVertexBuffer8Impl_AddRef((LPDIRECT3DVERTEXBUFFER8) *pStream);
+ if (*pStream != NULL) IDirect3DVertexBuffer8Impl_AddRef((LPDIRECT3DVERTEXBUFFER8) *pStream);
return D3D_OK;
}
Index: dlls/wined3d/device.c
===================================================================
RCS file: /home/wine/wine/dlls/wined3d/device.c,v
retrieving revision 1.21
diff -u -r1.21 device.c
--- dlls/wined3d/device.c 27 Jan 2005 10:40:57 -0000 1.21
+++ dlls/wined3d/device.c 4 Feb 2005 23:09:43 -0000
@@ -741,7 +741,7 @@
*pStream = This->stateBlock->stream_source[StreamNumber];
*pStride = This->stateBlock->stream_stride[StreamNumber];
*pOffset = This->stateBlock->stream_offset[StreamNumber];
- IWineD3DVertexBuffer_AddRef(*pStream); /* We have created a new reference to the VB */
+ if (*pStream != NULL) IWineD3DVertexBuffer_AddRef(*pStream); /* We have created a new reference to the VB */
return D3D_OK;
}
More information about the wine-patches
mailing list