[PATCH 1/6] d3drm: Implement IDirect3DRMViewport*::Init. (v7)

Henri Verbeet hverbeet at gmail.com
Wed Jul 27 14:23:02 CDT 2016


On 27 July 2016 at 21:09, Aaryaman Vasishta <jem456.vasishta at gmail.com> wrote:
> On Thu, Jul 28, 2016 at 12:13 AM, Stefan Dösinger
>> > +    if (material)
>> > +        IDirect3DMaterial_Release(material);
>> This will destroy the material, viewport::SetBackground doesn't addref it.
>
> Right, henri suggested the same. I'll move this outside the cleanup label.
I did say the sequence was odd, but it does work because "material" is
set to NULL on successful viewport initialisation. On the other hand,
I just noticed you'll also leak the material if
IDirect3DViewport_SetBackground() fails.



More information about the wine-devel mailing list