[WINED3D 4/6] Fix GetTexture() for uninitialized textures.

Ivan Gyurdiev ivg231 at gmail.com
Sat Oct 28 18:54:25 CDT 2006


GetTexture() should return OK (not INVALIDCALL), and set the texture to 
NULL if it hasn't been previously initialized.

Discovered by the stateblock test for textures.

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

diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index d82bf4e..33b4e87 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -5820,8 +5820,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl
     *ppTexture=This->updateStateBlock->textures[Stage];
     if (*ppTexture)
         IWineD3DBaseTexture_AddRef(*ppTexture);
-    else
-        return WINED3DERR_INVALIDCALL;
+
     return WINED3D_OK;
 }
 
-- 
1.4.2.4



More information about the wine-patches mailing list