[PATCH] wined3d: Handle NULL ptrs (Coverity)

Marcus Meissner marcus at jet.franken.de
Mon Nov 23 15:35:15 CST 2009


Hi,

If we check for NULL ptrs we should also return errors.

Ciao, Marcus
---
 dlls/wined3d/volume.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/dlls/wined3d/volume.c b/dlls/wined3d/volume.c
index bb5827e..5a80cb6 100644
--- a/dlls/wined3d/volume.c
+++ b/dlls/wined3d/volume.c
@@ -187,11 +187,13 @@ static HRESULT WINAPI IWineD3DVolumeImpl_GetContainer(IWineD3DVolume *iface, REF
 
     if (!ppContainer) {
         ERR("Called without a valid ppContainer.\n");
+        return E_FAIL;
     }
 
     /* Although surfaces can be standalone, volumes can't */
     if (!This->container) {
         ERR("Volume without an container. Should not happen.\n");
+        return E_FAIL;
     }
 
     TRACE("Relaying to QueryInterface\n");
-- 
1.5.6



More information about the wine-patches mailing list