Chris Robinson : wined3d: Avoid NULL dereference.

Alexandre Julliard julliard at wine.codeweavers.com
Mon Jul 31 10:38:59 CDT 2006


Module: wine
Branch: refs/heads/master
Commit: 92bc96a96b702093e1ea45e64501ab1f8bad8099
URL:    http://source.winehq.org/git/?p=wine.git;a=commit;h=92bc96a96b702093e1ea45e64501ab1f8bad8099

Author: Chris Robinson <chris.kcat at gmail.com>
Date:   Mon Jul 31 06:36:11 2006 -0700

wined3d: Avoid NULL dereference.

---

 dlls/wined3d/device.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 17a9cbb..a793d23 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -2405,7 +2405,9 @@ static HRESULT WINAPI IWineD3DDeviceImpl
     }
     *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);




More information about the wine-cvs mailing list