mirror of
git://source.winehq.org/git/wine.git
synced 2024-11-05 18:01:34 +00:00
wined3d: Destroy the resource after view in wined3d_rendertarget_view_decref.
Signed-off-by: Stefan Dösinger <stefandoesinger@gmx.at> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
4c71e37bbd
commit
d8da1db891
1 changed files with 3 additions and 2 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue