<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Sun, May 8, 2016 at 9:39 PM, Stefan Dösinger <span dir="ltr"><<a href="mailto:stefandoesinger@gmx.at" target="_blank">stefandoesinger@gmx.at</a>></span> 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>
<span class=""><br>
<br>
<br>
Am 2016-05-08 um 11:31 schrieb Aaryaman Vasishta:<br>
> +    hr = IDirect3DRMTexture2_InitFromImage(texture2, &initimg);<br>
> +    ok(hr == D3DRMERR_BADOBJECT, "Expected hr == D3DRMERR_BADOBJECT, got %x.\n", hr);<br>
> +    /* Release leaked reference to d3drm1 */<br>
> +    IDirect3DRM_Release(d3drm1);<br>
</span>I think it's a good idea to explicitly test the increased refcount<br>
after this failing call.<br></blockquote><div>The refcount tests which happen following the leak do (indirectly) test the increased refcount. If I hadn't released d3drm1 here, the following refcount tests would fail.<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<span class=""><br>
> +    if (!image<br>
> +            || !image->rgb<br>
> +            || !image->red_mask<br>
> +            || !image->green_mask<br>
> +            || !image->blue_mask<br>
> +            || !image->buffer1)<br>
> +    {<br>
> +        return FALSE;<br>
> +    }<br>
</span>I guess that there's some way to pass palletized images, e.g. by<br>
setting rgb = 0, palette_size != 0 and palette != NULL. This shouldn't<br>
be part of this patch though and I am fine with this code as it is.<br></blockquote><div>Agreed, that also needs to be tested. I'll add that test in this patch and rework this function. <br><br></div><div>Cheers,<br></div><div>Aaryaman<br></div></div></div></div>