Index: dlls/wined3d/device.c =================================================================== RCS file: /home/wine/wine/dlls/wined3d/device.c,v retrieving revision 1.100 diff -u -r1.100 device.c --- dlls/wined3d/device.c 23 Nov 2005 19:29:20 -0000 1.100 +++ dlls/wined3d/device.c 27 Nov 2005 05:07:49 -0000 @@ -4465,6 +4465,11 @@ IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; IWineD3DStateBlockImpl *object; TRACE("(%p)", This); + + if (This->isRecordingState) { + return D3DERR_INVALIDCALL; + } + object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IWineD3DStateBlockImpl)); if (NULL == object ) { FIXME("(%p)Error allocating memory for stateblock\n", This); Index: dlls/wined3d/pixelshader.c =================================================================== RCS file: /home/wine/wine/dlls/wined3d/pixelshader.c,v retrieving revision 1.4 diff -u -r1.4 pixelshader.c --- dlls/wined3d/pixelshader.c 23 Nov 2005 19:29:20 -0000 1.4 +++ dlls/wined3d/pixelshader.c 27 Nov 2005 05:07:50 -0000 @@ -100,8 +100,9 @@ HRESULT WINAPI IWineD3DPixelShaderImpl_GetParent(IWineD3DPixelShader *iface, IUnknown** parent){ IWineD3DPixelShaderImpl *This = (IWineD3DPixelShaderImpl *)iface; - *parent= (IUnknown*) parent; + *parent = This->parent; IUnknown_AddRef(*parent); + TRACE("(%p) : returning %p\n", This, *parent); return D3D_OK; } Index: dlls/wined3d/vertexshader.c =================================================================== RCS file: /home/wine/wine/dlls/wined3d/vertexshader.c,v retrieving revision 1.18 diff -u -r1.18 vertexshader.c --- dlls/wined3d/vertexshader.c 23 Nov 2005 19:29:20 -0000 1.18 +++ dlls/wined3d/vertexshader.c 27 Nov 2005 05:07:52 -0000 @@ -2012,8 +2012,9 @@ HRESULT WINAPI IWineD3DVertexShaderImpl_GetParent(IWineD3DVertexShader *iface, IUnknown** parent){ IWineD3DVertexShaderImpl *This = (IWineD3DVertexShaderImpl *)iface; - *parent = (IUnknown*)This->parent; + *parent = This->parent; IUnknown_AddRef(*parent); + TRACE("(%p) : returning %p\n", This, *parent); return D3D_OK; }