qcap: Release filter only if allocated.

Fixes test crash when built without v4l2.

Signed-off-by: Marcus Meissner <marcus@jet.franken.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Marcus Meissner 2019-06-05 09:19:07 +02:00 committed by Alexandre Julliard
parent 68b15fec00
commit e4331ce6e5
1 changed files with 2 additions and 2 deletions

View File

@ -118,12 +118,12 @@ START_TEST(videocapture)
{
test_capture(filter);
IBaseFilter_Release(filter);
ref = IBaseFilter_Release(filter);
ok(!ref, "Got outstanding refcount %d.\n", ref);
}
else
skip("Failed to open capture device, hr=%#x.\n", hr);
ref = IBaseFilter_Release(filter);
ok(!ref, "Got outstanding refcount %d.\n", ref);
IMoniker_Release(moniker);
}