-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Hi,
Here's something for future reference. I believe Henri mentioned the same thing for a different place already. I don't think a resend is necessary for this, you can fix this when you add this test for d3drm1 and d3drm3.
Am 2015-06-27 um 18:38 schrieb Aaryaman Vasishta:
- hr = IDirectDrawSurface_GetClipper(d3drm_primary, &d3drm_clipper);
- ok(hr == DD_OK, "Cannot get attached clipper from primary surface (hr = %x).\n", hr);
- if (SUCCEEDED(hr))
- {
ok(d3drm_clipper == clipper, "Expected clipper returned == %p, got %p.\n", clipper , d3drm_clipper);
IDirectDrawClipper_Release(d3drm_clipper);
- }
You don't really need the if (SUCCEEDED(hr)) here. You're unconditionally expecting GetClipper to return a clipper in the ok() line above. If it doesn't return one the test already failed, and there's no need to bother about preventing follow-up failures or crashes.
(Yeah, we have many instances in the code of things like these, e.g. if (SUCCEEDED(hr)) after BeginScene / EndScene. They should ideally be fixe d.)
- if (d3drm_primary)
IDirectDrawSurface_Release(d3drm_primary);
Same thing here.