IWineD3DImpl_GetPixelShader: Fix null pointer check

Sagar Mittal sagar.mittal at gmail.com
Thu Apr 13 19:48:59 CDT 2006


Check that referenced shader is non-null, rather than reference.

Index: dlls/wined3d/device.c
===================================================================
RCS file: /home/wine/wine/dlls/wined3d/device.c,v
retrieving revision 1.178
diff -u -p -r1.178 device.c
--- dlls/wined3d/device.c       13 Apr 2006 10:18:07 -0000      1.178
+++ dlls/wined3d/device.c       14 Apr 2006 00:34:52 -0000
@@ -4250,7 +4250,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_GetPix
     }

     *ppShader =  This->stateBlock->pixelShader;
-    if (NULL != ppShader) {
+    if (NULL != *ppShader) {
         IWineD3DPixelShader_AddRef(*ppShader);
     }
     TRACE("(%p) : returning %p\n", This, *ppShader);



More information about the wine-patches mailing list