qedit/mediadet: Check for failure from IEnumPins::Next().

Fixes a test crash when gstreamer is not present.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zebediah Figura 2019-10-31 23:33:32 -05:00 committed by Alexandre Julliard
parent b796b9fba8
commit 9defa529fc
1 changed files with 6 additions and 1 deletions

View File

@ -456,7 +456,12 @@ static HRESULT GetSplitter(MediaDetImpl *This)
IPin_Release(source_pin);
goto retry;
}
IEnumPins_Next(pins, 1, &splitter_pin, NULL);
if (IEnumPins_Next(pins, 1, &splitter_pin, NULL) != S_OK)
{
IEnumPins_Release(pins);
IPin_Release(source_pin);
goto retry;
}
IEnumPins_Release(pins);
hr = IPin_Connect(source_pin, splitter_pin, NULL);