Commit 07c038c2 authored by Aaryaman Vasishta's avatar Aaryaman Vasishta Committed by Alexandre Julliard

d3drm: Introduce d3drm_texture_destroy helper.

parent bebe679d
......@@ -44,6 +44,14 @@ static inline struct d3drm_texture *impl_from_IDirect3DRMTexture3(IDirect3DRMTex
return CONTAINING_RECORD(iface, struct d3drm_texture, IDirect3DRMTexture3_iface);
}
static void d3drm_texture_destroy(struct d3drm_texture *texture)
{
TRACE("texture %p is being destroyed.\n", texture);
d3drm_object_cleanup((IDirect3DRMObject*)&texture->IDirect3DRMTexture3_iface, &texture->obj);
HeapFree(GetProcessHeap(), 0, texture);
}
static HRESULT WINAPI d3drm_texture1_QueryInterface(IDirect3DRMTexture *iface, REFIID riid, void **out)
{
struct d3drm_texture *texture = impl_from_IDirect3DRMTexture(iface);
......@@ -722,10 +730,7 @@ static ULONG WINAPI d3drm_texture3_Release(IDirect3DRMTexture3 *iface)
TRACE("%p decreasing refcount to %u.\n", iface, refcount);
if (!refcount)
{
d3drm_object_cleanup((IDirect3DRMObject*)iface, &texture->obj);
HeapFree(GetProcessHeap(), 0, texture);
}
d3drm_texture_destroy(texture);
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