On 27 July 2016 at 21:09, Aaryaman Vasishta jem456.vasishta@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.