Commit b10ba611 authored by Carlos Lozano's avatar Carlos Lozano Committed by Alexandre Julliard

Check that pstream is not null.

parent fbf3b25b
...@@ -4344,7 +4344,7 @@ HRESULT WINAPI IDirect3DDevice8Impl_GetStreamSource(LPDIRECT3DDEVICE8 iface, U ...@@ -4344,7 +4344,7 @@ HRESULT WINAPI IDirect3DDevice8Impl_GetStreamSource(LPDIRECT3DDEVICE8 iface, U
TRACE("(%p) : StreamNo: %d, Stream (%p), Stride %d\n", This, StreamNumber, This->StateBlock->stream_source[StreamNumber], This->StateBlock->stream_stride[StreamNumber]); 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]; *pStream = This->StateBlock->stream_source[StreamNumber];
*pStride = This->StateBlock->stream_stride[StreamNumber]; *pStride = This->StateBlock->stream_stride[StreamNumber];
IDirect3DVertexBuffer8Impl_AddRef((LPDIRECT3DVERTEXBUFFER8) *pStream); if (*pStream != NULL) IDirect3DVertexBuffer8Impl_AddRef((LPDIRECT3DVERTEXBUFFER8) *pStream);
return D3D_OK; return D3D_OK;
} }
......
...@@ -741,7 +741,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_GetStreamSource(IWineD3DDevice *iface, UINT St ...@@ -741,7 +741,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_GetStreamSource(IWineD3DDevice *iface, UINT St
*pStream = This->stateBlock->stream_source[StreamNumber]; *pStream = This->stateBlock->stream_source[StreamNumber];
*pStride = This->stateBlock->stream_stride[StreamNumber]; *pStride = This->stateBlock->stream_stride[StreamNumber];
*pOffset = This->stateBlock->stream_offset[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; return D3D_OK;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment