Henri Verbeet : wined3d: Don' t set a NULL container of type WINED3D_CONTAINER_TEXTURE.
Module: wine Branch: master Commit: 22428d97e18e76ba76c10df945cf956ab1897101 URL: http://source.winehq.org/git/wine.git/?a=commit;h=22428d97e18e76ba76c10df945... Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Wed Aug 25 20:46:49 2010 +0200 wined3d: Don't set a NULL container of type WINED3D_CONTAINER_TEXTURE. Any container type other than WINED3D_CONTAINER_NONE implies a valid pointer of the specified type. This fixes a regression introduced by 368e5eb87ae983e4ea2f66b3ca2f4154b36bbcda. --- dlls/wined3d/device.c | 2 +- dlls/wined3d/surface.c | 3 +++ 2 files changed, 4 insertions(+), 1 deletions(-) diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 963d132..c3d0976 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -5663,7 +5663,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetFrontBackBuffers(IWineD3DDevice *ifa TRACE("Changing the back buffer from %p to %p.\n", swapchain->back_buffers[0], back_impl); if (swapchain->back_buffers[0]) - surface_set_container(swapchain->back_buffers[0], WINED3D_CONTAINER_TEXTURE, NULL); + surface_set_container(swapchain->back_buffers[0], WINED3D_CONTAINER_NONE, NULL); swapchain->back_buffers[0] = back_impl; if (back_impl) diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index 662ef7b..93559a1 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -96,6 +96,9 @@ void surface_set_container(IWineD3DSurfaceImpl *surface, enum wined3d_container_ { TRACE("surface %p, container %p.\n", surface, container); + if (!container && type != WINED3D_CONTAINER_NONE) + ERR("Setting NULL container of type %#x.\n", type); + if (type == WINED3D_CONTAINER_SWAPCHAIN) { surface->get_drawable_size = get_drawable_size_swapchain;
participants (1)
-
Alexandre Julliard