From 1c47ee7afa7b7144752d40a61871b5e9111d3b17 Mon Sep 17 00:00:00 2001 From: Zebediah Figura Date: Thu, 31 Oct 2019 23:33:32 -0500 Subject: [PATCH] qedit/mediadet: Check for failure from IEnumPins::Next(). Fixes a test crash when gstreamer is not present. Signed-off-by: Zebediah Figura Signed-off-by: Alexandre Julliard (cherry picked from commit 9defa529fcc98dad5387a0a6c2a7ea40a8966808) Signed-off-by: Michael Stefaniuc --- dlls/qedit/mediadet.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/dlls/qedit/mediadet.c b/dlls/qedit/mediadet.c index b7a5abb80ca..1d70a86a5ad 100644 --- a/dlls/qedit/mediadet.c +++ b/dlls/qedit/mediadet.c @@ -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);