mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-16 18:50:45 +00:00
ddraw/tests: Properly cleanup on failed device creation in a couple of places.
This commit is contained in:
parent
89d561e6f8
commit
fa90a256d7
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue