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
368e5eb87a.
This commit is contained in:
Henri Verbeet 2010-08-25 20:46:49 +02:00 committed by Alexandre Julliard
parent 69637dbed6
commit 22428d97e1
2 changed files with 4 additions and 1 deletions

View File

@ -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)

View File

@ -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;