From 92bc96a96b702093e1ea45e64501ab1f8bad8099 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Mon, 31 Jul 2006 06:36:11 -0700 Subject: [PATCH] wined3d: Avoid NULL dereference. --- dlls/wined3d/device.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 17a9cbb53a0..a793d23b0b1 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -2405,7 +2405,9 @@ static HRESULT WINAPI IWineD3DDeviceImpl_GetStreamSource(IWineD3DDevice *iface, } *pStream = This->stateBlock->streamSource[StreamNumber]; *pStride = This->stateBlock->streamStride[StreamNumber]; - *pOffset = This->stateBlock->streamOffset[StreamNumber]; + if (pOffset) { + *pOffset = This->stateBlock->streamOffset[StreamNumber]; + } if (*pStream == NULL) { FIXME("Attempting to get an empty stream %d, returning WINED3DERR_INVALIDCALL\n", StreamNumber);