ddraw/tests: Properly release surfaces even if we can't get the texture object.
This commit is contained in:
parent
340f5734bf
commit
60d389670a
@ -1030,7 +1030,8 @@ static void IFaceRefCount(void)
|
|||||||
|
|
||||||
/* IDirect3DTexture interface (unlike the others) alters the original IDirectDrawSurface ref count */
|
/* IDirect3DTexture interface (unlike the others) alters the original IDirectDrawSurface ref count */
|
||||||
ret = IDirectDrawSurface_QueryInterface(surf, &IID_IDirect3DTexture, (void **) &tex);
|
ret = IDirectDrawSurface_QueryInterface(surf, &IID_IDirect3DTexture, (void **) &tex);
|
||||||
if (ret == E_NOINTERFACE) return; /* win64 */
|
if (SUCCEEDED(ret))
|
||||||
|
{
|
||||||
ref = getRefcount((IUnknown *) tex);
|
ref = getRefcount((IUnknown *) tex);
|
||||||
todo_wine ok(ref == 2, "Refcount is %u, expected 2\n", ref);
|
todo_wine ok(ref == 2, "Refcount is %u, expected 2\n", ref);
|
||||||
ref = getRefcount((IUnknown *) surf);
|
ref = getRefcount((IUnknown *) surf);
|
||||||
@ -1060,6 +1061,7 @@ static void IFaceRefCount(void)
|
|||||||
|
|
||||||
ref = IDirectDrawGammaControl_Release(gamma); /* Release the gamma control */
|
ref = IDirectDrawGammaControl_Release(gamma); /* Release the gamma control */
|
||||||
todo_wine ok(ref == 0, "Refcount is %u, expected 0\n", ref);
|
todo_wine ok(ref == 0, "Refcount is %u, expected 0\n", ref);
|
||||||
|
}
|
||||||
|
|
||||||
ref = IDirectDrawSurface2_Release(surf2); /* Release one of the 2 surf2 interfaces */
|
ref = IDirectDrawSurface2_Release(surf2); /* Release one of the 2 surf2 interfaces */
|
||||||
todo_wine ok(ref == 1, "Refcount is %u, expected 1\n", ref);
|
todo_wine ok(ref == 1, "Refcount is %u, expected 1\n", ref);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user