diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 963d1329518..c3d0976ccb5 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 662ef7b25d0..93559a17815 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;