On Wed, May 11, 2016 at 9:13 PM, Henri Verbeet <hverbeet@gmail.com> wrote:
On 11 May 2016 at 16:43, Aaryaman Vasishta <jem456.vasishta@gmail.com> wrote:
> @@ -46,10 +46,27 @@ static inline struct d3drm_texture *impl_from_IDirect3DRMTexture3(IDirect3DRMTex
>
>  void d3drm_texture_destroy(struct d3drm_texture *texture)
>  {
> +    if (texture->image)
> +        IDirect3DRM_Release(texture->d3drm);
>      d3drm_object_cleanup((IDirect3DRMObject*)&texture->IDirect3DRMTexture3_iface, &texture->obj);
It's somewhat hypothetical, but it seems safer to release the
IDirect3DRM interface after the d3drm_object_cleanup() call, in case
there are callbacks that (implicitly) depend on the Direct3DRM object
still existing. (E.g., is it possible to call
IDirect3DRMObject2::GetDirect3DRM() on textures?)
Right, it makes sense once you take in future pathces in mind.
A quick test reveals that you it's possible to call IDirect3DRMObject2::GetDirect3DRM() on textures (and probably any object that inherits IDirect3DRMObject2) so this change does make sense for when this interface is implemented.
 

I'll resent this patch as well.


Cheers,
Aaryaman