Le Friday 26 December 2008 22:35:18 Vincent Pelletier, vous avez écrit : > As I guess IWineD3DDeviceImpl_CreateTexture should then return a > failure code, I patched it and made the test give up if texture > allocation failed. (patch attached)
Updated to test previous return code, instead of accessing a list behin potentially NULL pointer. -- Vincent Pelletier
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 36fbcba..e87af6f 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -871,6 +871,8 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateTexture(IWineD3DDevice *iface, U hr = D3DCB_CreateSurface(This->parent, parent, tmpW, tmpH, Format, Usage, Pool, i, WINED3DCUBEMAP_FACE_POSITIVE_X, &object->surfaces[i],NULL); if (hr!= WINED3D_OK || ( (IWineD3DSurfaceImpl *) object->surfaces[i])->Flags & SFLAG_OVERSIZE) { FIXME("Failed to create surface %p\n", object); + if (hr == WINED3D_OK) + hr = WINED3DERR_OUTOFVIDEOMEMORY; /* clean up */ object->surfaces[i] = NULL; IWineD3DTexture_Release((IWineD3DTexture *)object);