Commit 53cd851c authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

renderer_discovery: Ensure we don't double release items

parent dc450501
......@@ -168,7 +168,9 @@ vlc_renderer_item_release(vlc_renderer_item_t *p_item)
{
assert(p_item != NULL);
if (atomic_fetch_sub(&p_item->refs, 1) != 1)
int refs = atomic_fetch_sub(&p_item->refs, 1);
assert(refs != 0 );
if( refs != 1 )
return;
item_free(p_item);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment