mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-06 14:04:07 +00:00
wmvcore/tests: Check out value for NULL in check_interface.
This commit is contained in:
parent
d6ccab8ecd
commit
2ae2d2fd07
|
@ -134,7 +134,7 @@ static WCHAR *load_resource(const WCHAR *name)
|
|||
static HRESULT check_interface_(unsigned int line, void *iface, REFIID riid, BOOL supported)
|
||||
{
|
||||
HRESULT hr, expected_hr;
|
||||
IUnknown *unknown = iface, *out;
|
||||
IUnknown *unknown = iface, *out = (IUnknown *)0xbeef;
|
||||
|
||||
expected_hr = supported ? S_OK : E_NOINTERFACE;
|
||||
|
||||
|
@ -142,6 +142,8 @@ static HRESULT check_interface_(unsigned int line, void *iface, REFIID riid, BOO
|
|||
ok_(__FILE__, line)(hr == expected_hr, "Got hr %#lx, expected %#lx.\n", hr, expected_hr);
|
||||
if (SUCCEEDED(hr))
|
||||
IUnknown_Release(out);
|
||||
else if (!supported)
|
||||
ok_(__FILE__, line)(out == NULL, "Expected out == NULL\n");
|
||||
return hr;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue