Commit 4ec615d8 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

vlc_object_find*: don't check that refcount is zero

Besides, we assert that this isn't the case right before...
parent 19bd84c7
......@@ -744,9 +744,10 @@ void * __vlc_object_find( vlc_object_t *p_this, int i_type, int i_mode )
vlc_mutex_lock( &structure_lock );
assert( vlc_internals( p_this )->i_refcount > 0 );
/* If we are of the requested type ourselves, don't look further */
if( !(i_mode & FIND_STRICT) && p_this->i_object_type == i_type
&& vlc_internals( p_this )->i_refcount > 0 )
if( !(i_mode & FIND_STRICT) && p_this->i_object_type == i_type )
{
vlc_object_yield_locked( p_this );
vlc_mutex_unlock( &structure_lock );
......@@ -802,8 +803,7 @@ void * __vlc_object_find_name( vlc_object_t *p_this, const char *psz_name,
/* If have the requested name ourselves, don't look further */
if( !(i_mode & FIND_STRICT)
&& p_this->psz_object_name
&& !strcmp( p_this->psz_object_name, psz_name )
&& vlc_internals( p_this )->i_refcount > 0 )
&& !strcmp( p_this->psz_object_name, psz_name ) )
{
vlc_object_yield_locked( p_this );
vlc_mutex_unlock( &structure_lock );
......
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