wined3d: Only check rtv and dsv bindings in device_resource_released() when D3D is initialised.

This fixes a regression introduced by commit
4a9304305a.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Henri Verbeet 2017-01-04 00:04:48 +01:00 committed by Alexandre Julliard
parent c7c0415689
commit 9a789feb81
1 changed files with 9 additions and 6 deletions

View File

@ -4958,6 +4958,8 @@ void device_resource_released(struct wined3d_device *device, struct wined3d_reso
TRACE("device %p, resource %p, type %s.\n", device, resource, debug_d3dresourcetype(type));
if (device->d3d_initialized)
{
for (i = 0; i < device->adapter->gl_info.limits.buffers; ++i)
{
if ((rtv = device->fb.render_targets[i]) && rtv->resource == resource)
@ -4966,6 +4968,7 @@ void device_resource_released(struct wined3d_device *device, struct wined3d_reso
if ((rtv = device->fb.depth_stencil) && rtv->resource == resource)
ERR("Resource %p is still in use as depth/stencil buffer.\n", resource);
}
switch (type)
{