wined3d: Avoid NULL dereference.

This commit is contained in:
Chris Robinson 2006-07-31 06:36:11 -07:00 committed by Alexandre Julliard
parent 3f19ffe809
commit 92bc96a96b
1 changed files with 3 additions and 1 deletions

View File

@ -2405,7 +2405,9 @@ static HRESULT WINAPI IWineD3DDeviceImpl_GetStreamSource(IWineD3DDevice *iface,
} }
*pStream = This->stateBlock->streamSource[StreamNumber]; *pStream = This->stateBlock->streamSource[StreamNumber];
*pStride = This->stateBlock->streamStride[StreamNumber]; *pStride = This->stateBlock->streamStride[StreamNumber];
*pOffset = This->stateBlock->streamOffset[StreamNumber]; if (pOffset) {
*pOffset = This->stateBlock->streamOffset[StreamNumber];
}
if (*pStream == NULL) { if (*pStream == NULL) {
FIXME("Attempting to get an empty stream %d, returning WINED3DERR_INVALIDCALL\n", StreamNumber); FIXME("Attempting to get an empty stream %d, returning WINED3DERR_INVALIDCALL\n", StreamNumber);