Commit a6b714d0 authored by Marcus Meissner's avatar Marcus Meissner Committed by Alexandre Julliard

ddrawex: Remove superflous NULL checks, add error skips (Coverity).

parent e4d63f77
...@@ -422,8 +422,17 @@ START_TEST(surface) ...@@ -422,8 +422,17 @@ START_TEST(surface)
hr = pDllGetClassObject(&CLSID_DirectDrawFactory, &IID_IClassFactory, (void **) &classfactory); hr = pDllGetClassObject(&CLSID_DirectDrawFactory, &IID_IClassFactory, (void **) &classfactory);
ok(hr == S_OK, "Failed to create a IClassFactory\n"); ok(hr == S_OK, "Failed to create a IClassFactory\n");
if (!SUCCEEDED(hr)) {
skip("Failed to get DirectDrawFactory\n");
return;
}
hr = IClassFactory_CreateInstance(classfactory, NULL, &IID_IDirectDrawFactory, (void **) &factory); hr = IClassFactory_CreateInstance(classfactory, NULL, &IID_IDirectDrawFactory, (void **) &factory);
ok(hr == S_OK, "Failed to create a IDirectDrawFactory\n"); ok(hr == S_OK, "Failed to create a IDirectDrawFactory\n");
if (!SUCCEEDED(hr)) {
IClassFactory_Release(classfactory);
skip("Failed to get a DirectDrawFactory\n");
return;
}
GetDCTest(); GetDCTest();
CapsTest(); CapsTest();
...@@ -431,12 +440,8 @@ START_TEST(surface) ...@@ -431,12 +440,8 @@ START_TEST(surface)
test_surface_from_dc3(); test_surface_from_dc3();
test_surface_from_dc4(); test_surface_from_dc4();
if(factory) { ref = IDirectDrawFactory_Release(factory);
ref = IDirectDrawFactory_Release(factory); ok(ref == 0, "IDirectDrawFactory not cleanly released\n");
ok(ref == 0, "IDirectDrawFactory not cleanly released\n"); ref = IClassFactory_Release(classfactory);
} todo_wine ok(ref == 1, "IClassFactory refcount wrong, ref = %u\n", ref);
if(classfactory) {
ref = IClassFactory_Release(classfactory);
todo_wine ok(ref == 1, "IClassFactory refcount wrong, ref = %u\n", ref);
}
} }
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