Commit 4a416f8d authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

ddraw: Release the surface clipper (if any) in ddraw_surface_wined3d_object_destroyed() (Valgrind).

parent eb27944e
......@@ -5615,6 +5615,9 @@ static void STDMETHODCALLTYPE ddraw_surface_wined3d_object_destroyed(void *paren
/* Reduce the ddraw surface count. */
list_remove(&surface->surface_list_entry);
if (surface->clipper)
IDirectDrawClipper_Release(&surface->clipper->IDirectDrawClipper_iface);
if (surface == surface->ddraw->primary)
surface->ddraw->primary = NULL;
......
......@@ -627,6 +627,7 @@ static void test_clipper_blt(void)
IDirectDraw *ddraw;
RGNDATA *rgn_data;
D3DCOLOR color;
ULONG refcount;
HRGN r1, r2;
HWND window;
DDBLTFX fx;
......@@ -819,7 +820,8 @@ static void test_clipper_blt(void)
IDirectDrawSurface_Release(dst_surface);
IDirectDrawSurface_Release(src_surface);
IDirectDrawClipper_Release(clipper);
refcount = IDirectDrawClipper_Release(clipper);
ok(!refcount, "Clipper has %u references left.\n", refcount);
IDirectDraw_Release(ddraw);
}
......
......@@ -521,6 +521,7 @@ static void test_clipper_blt(void)
IDirectDraw2 *ddraw;
RGNDATA *rgn_data;
D3DCOLOR color;
ULONG refcount;
HRGN r1, r2;
HWND window;
DDBLTFX fx;
......@@ -713,7 +714,8 @@ static void test_clipper_blt(void)
IDirectDrawSurface_Release(dst_surface);
IDirectDrawSurface_Release(src_surface);
IDirectDrawClipper_Release(clipper);
refcount = IDirectDrawClipper_Release(clipper);
ok(!refcount, "Clipper has %u references left.\n", refcount);
IDirectDraw2_Release(ddraw);
}
......
......@@ -742,6 +742,7 @@ static void test_clipper_blt(void)
IDirectDraw4 *ddraw;
RGNDATA *rgn_data;
D3DCOLOR color;
ULONG refcount;
HRGN r1, r2;
HWND window;
DDBLTFX fx;
......@@ -934,7 +935,8 @@ static void test_clipper_blt(void)
IDirectDrawSurface4_Release(dst_surface);
IDirectDrawSurface4_Release(src_surface);
IDirectDrawClipper_Release(clipper);
refcount = IDirectDrawClipper_Release(clipper);
ok(!refcount, "Clipper has %u references left.\n", refcount);
IDirectDraw4_Release(ddraw);
}
......
......@@ -666,6 +666,7 @@ static void test_clipper_blt(void)
IDirectDraw7 *ddraw;
RGNDATA *rgn_data;
D3DCOLOR color;
ULONG refcount;
HRGN r1, r2;
HWND window;
DDBLTFX fx;
......@@ -858,7 +859,8 @@ static void test_clipper_blt(void)
IDirectDrawSurface7_Release(dst_surface);
IDirectDrawSurface7_Release(src_surface);
IDirectDrawClipper_Release(clipper);
refcount = IDirectDrawClipper_Release(clipper);
ok(!refcount, "Clipper has %u references left.\n", refcount);
IDirectDraw7_Release(ddraw);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment