Commit d8da1db8 authored by Stefan Dösinger's avatar Stefan Dösinger Committed by Alexandre Julliard

wined3d: Destroy the resource after view in wined3d_rendertarget_view_decref.

parent 4c71e37b
......@@ -46,13 +46,14 @@ ULONG CDECL wined3d_rendertarget_view_decref(struct wined3d_rendertarget_view *v
if (!refcount)
{
struct wined3d_device *device = view->resource->device;
struct wined3d_resource *resource = view->resource;
struct wined3d_device *device = resource->device;
/* Call wined3d_object_destroyed() before releasing the resource,
* since releasing the resource may end up destroying the parent. */
view->parent_ops->wined3d_object_destroyed(view->parent);
wined3d_resource_decref(view->resource);
wined3d_cs_emit_destroy_object(device->cs, wined3d_rendertarget_view_destroy_object, view);
wined3d_resource_decref(resource);
}
return refcount;
......
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