Commit 22428d97 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

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 368e5eb8.
parent 69637dbe
......@@ -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)
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment