Commit fa90a256 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

ddraw/tests: Properly cleanup on failed device creation in a couple of places.

parent 89d561e6
......@@ -1158,6 +1158,7 @@ static void test_ck_rgba(void)
if (!(device = create_device(ddraw, window, DDSCL_NORMAL)))
{
skip("Failed to create D3D device, skipping test.\n");
IDirectDraw_Release(ddraw);
DestroyWindow(window);
return;
}
......@@ -1390,6 +1391,7 @@ static void test_surface_qi(void)
if (!(ddraw = create_ddraw()))
{
skip("Failed to create a ddraw object, skipping test.\n");
DestroyWindow(window);
return;
}
/* Try to create a D3D device to see if the ddraw implementation supports
......@@ -1398,6 +1400,7 @@ static void test_surface_qi(void)
if (!(device = create_device(ddraw, window, DDSCL_NORMAL)))
{
skip("Failed to create D3D device, skipping test.\n");
IDirectDraw_Release(ddraw);
DestroyWindow(window);
return;
}
......@@ -1483,6 +1486,7 @@ static void test_device_qi(void)
if (!(device = create_device(ddraw, window, DDSCL_NORMAL)))
{
skip("Failed to create D3D device, skipping test.\n");
IDirectDraw_Release(ddraw);
DestroyWindow(window);
return;
}
......
......@@ -1373,6 +1373,7 @@ static void test_ck_rgba(void)
if (!(device = create_device(ddraw, window, DDSCL_NORMAL)))
{
skip("Failed to create D3D device, skipping test.\n");
IDirectDraw2_Release(ddraw);
DestroyWindow(window);
return;
}
......@@ -1586,6 +1587,7 @@ static void test_surface_qi(void)
if (!(ddraw = create_ddraw()))
{
skip("Failed to create a ddraw object, skipping test.\n");
DestroyWindow(window);
return;
}
/* Try to create a D3D device to see if the ddraw implementation supports
......@@ -1594,6 +1596,7 @@ static void test_surface_qi(void)
if (!(device = create_device(ddraw, window, DDSCL_NORMAL)))
{
skip("Failed to create D3D device, skipping test.\n");
IDirectDraw2_Release(ddraw);
DestroyWindow(window);
return;
}
......@@ -1678,6 +1681,7 @@ static void test_device_qi(void)
if (!(device = create_device(ddraw, window, DDSCL_NORMAL)))
{
skip("Failed to create D3D device, skipping test.\n");
IDirectDraw2_Release(ddraw);
DestroyWindow(window);
return;
}
......
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