[PATCH 04/11] mfplat: Implement IMFAttributes::{SetItem, GetItem}.
Nikolay Sivov
nsivov at codeweavers.com
Fri Dec 28 11:05:49 CST 2018
I don't think you need SAFE iterators for Get/Set.
> + EnterCriticalSection(&object->lock);
> +
> + if (!list_empty(&object->attributes))
> + {
> + struct mfattribute *attribute, *attribute2;
> +
> + LIST_FOR_EACH_ENTRY_SAFE(attribute, attribute2, &object->attributes, struct mfattribute, entry)
> + {
> + PropVariantClear(&attribute->value);
> + list_remove(&attribute->entry);
> + heap_free(attribute);
> + }
> + }
> +
> + LeaveCriticalSection(&object->lock);
> +
> + object->lock.DebugInfo->Spare[0] = 0;
> + DeleteCriticalSection(&object->lock);
Empty list check is redundant.
More information about the wine-devel
mailing list