From: Anton Baskanov baskanov@gmail.com
Signed-off-by: Anton Baskanov baskanov@gmail.com Signed-off-by: Zebediah Figura z.figura12@gmail.com --- v3: no changes.
dlls/amstream/filter.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/dlls/amstream/filter.c b/dlls/amstream/filter.c index fb9b1d9aee5..f89fe13e625 100644 --- a/dlls/amstream/filter.c +++ b/dlls/amstream/filter.c @@ -361,14 +361,14 @@ static HRESULT WINAPI filter_EnumPins(IMediaStreamFilter *iface, IEnumPins **enu
TRACE("iface %p, enum_pins %p.\n", iface, enum_pins);
- EnterCriticalSection(&filter->cs); - if (!enum_pins) return E_POINTER;
if (!(object = heap_alloc(sizeof(*object)))) return E_OUTOFMEMORY;
+ EnterCriticalSection(&filter->cs); + object->IEnumPins_iface.lpVtbl = &enum_pins_vtbl; object->refcount = 1; object->count = filter->nb_streams; @@ -376,6 +376,7 @@ static HRESULT WINAPI filter_EnumPins(IMediaStreamFilter *iface, IEnumPins **enu if (!(object->pins = heap_alloc(filter->nb_streams * sizeof(*object->pins)))) { heap_free(object); + LeaveCriticalSection(&filter->cs); return E_OUTOFMEMORY; } for (i = 0; i < filter->nb_streams; ++i)