Commit 6c385c50 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Don't check for 0 refcount.

If it happens, there is a bug, and we'll assert in _yield.
parent 4ec615d8
...@@ -1297,8 +1297,7 @@ static vlc_object_t * FindObject( vlc_object_t *p_this, int i_type, int i_mode ) ...@@ -1297,8 +1297,7 @@ static vlc_object_t * FindObject( vlc_object_t *p_this, int i_type, int i_mode )
p_tmp = p_this->p_parent; p_tmp = p_this->p_parent;
if( p_tmp ) if( p_tmp )
{ {
if( p_tmp->i_object_type == i_type if( p_tmp->i_object_type == i_type )
&& vlc_internals( p_tmp )->i_refcount > 0 )
{ {
vlc_object_yield_locked( p_tmp ); vlc_object_yield_locked( p_tmp );
return p_tmp; return p_tmp;
...@@ -1314,8 +1313,7 @@ static vlc_object_t * FindObject( vlc_object_t *p_this, int i_type, int i_mode ) ...@@ -1314,8 +1313,7 @@ static vlc_object_t * FindObject( vlc_object_t *p_this, int i_type, int i_mode )
for( i = p_this->i_children; i--; ) for( i = p_this->i_children; i--; )
{ {
p_tmp = p_this->pp_children[i]; p_tmp = p_this->pp_children[i];
if( p_tmp->i_object_type == i_type if( p_tmp->i_object_type == i_type )
&& vlc_internals( p_tmp )->i_refcount > 0 )
{ {
vlc_object_yield_locked( p_tmp ); vlc_object_yield_locked( p_tmp );
return p_tmp; return p_tmp;
...@@ -1353,8 +1351,7 @@ static vlc_object_t * FindObjectName( vlc_object_t *p_this, ...@@ -1353,8 +1351,7 @@ static vlc_object_t * FindObjectName( vlc_object_t *p_this,
if( p_tmp ) if( p_tmp )
{ {
if( p_tmp->psz_object_name if( p_tmp->psz_object_name
&& !strcmp( p_tmp->psz_object_name, psz_name ) && !strcmp( p_tmp->psz_object_name, psz_name ) )
&& vlc_internals( p_tmp )->i_refcount > 0 )
{ {
vlc_object_yield_locked( p_tmp ); vlc_object_yield_locked( p_tmp );
return p_tmp; return p_tmp;
...@@ -1371,8 +1368,7 @@ static vlc_object_t * FindObjectName( vlc_object_t *p_this, ...@@ -1371,8 +1368,7 @@ static vlc_object_t * FindObjectName( vlc_object_t *p_this,
{ {
p_tmp = p_this->pp_children[i]; p_tmp = p_this->pp_children[i];
if( p_tmp->psz_object_name if( p_tmp->psz_object_name
&& !strcmp( p_tmp->psz_object_name, psz_name ) && !strcmp( p_tmp->psz_object_name, psz_name ) )
&& vlc_internals( p_tmp )->i_refcount > 0 )
{ {
vlc_object_yield_locked( p_tmp ); vlc_object_yield_locked( p_tmp );
return p_tmp; return p_tmp;
......
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