<br><br>On Monday, June 27, 2016, Stefan Dösinger <<a href="mailto:stefandoesinger@gmail.com">stefandoesinger@gmail.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">-----BEGIN PGP SIGNED MESSAGE-----<br>
Hash: SHA256<br>
<br>
Am 2016-06-24 um 22:49 schrieb Aaryaman Vasishta:<br>
> +    if (FAILED(hr = IDirect3DRMDevice_QueryInterface(device, &IID_IDirect3DRMDevice3, (void **)&device3)))<br>
> +        return hr;<br>
> +<br>
> +    if (FAILED(hr = IDirect3DRMFrame_QueryInterface(camera, &IID_IDirect3DRMFrame3, (void **)&camera3)))<br>
> +    {<br>
> +        IDirect3DRMDevice3_Release(device3);<br>
> +        return hr;<br>
> +    }<br>
> +    IDirect3DRMDevice_Release(device);<br>
> +    IDirect3DRMFrame_Release(camera);<br>
> +<br>
> +    return d3drm_viewport2_Init(&viewport->IDirect3DRMViewport2_iface, device3, camera3, x, y, width, height);<br>
This has the same problem as the first version of your frame thunks: You get "device3", but then you release "device", to which you don't hold a reference.</blockquote><div>Right, I should probably release device3 after calling d3drm_viewport2_init.</div><div><br></div><div>Cheers,</div><div>Aaryaman</div><br>