Commit 5bfd7ba2 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

We may still have children when destroyed...

...if the destructor destroys them properly.
parent 3d7eabaf
...@@ -879,15 +879,9 @@ void __vlc_object_release( vlc_object_t *p_this ) ...@@ -879,15 +879,9 @@ void __vlc_object_release( vlc_object_t *p_this )
/* Detach from parent to protect against FIND_CHILDREN */ /* Detach from parent to protect against FIND_CHILDREN */
if (p_this->p_parent) if (p_this->p_parent)
vlc_object_detach_unlocked (p_this); vlc_object_detach_unlocked (p_this);
#ifndef NDEBUG /* Detach from children to protect against FIND_PARENT */
/* Detach from children to protect against FIND_PARENT.
* Destroying an object with children is currently not allowed anyway.
* This code is there only to ensure that the debugging code in
* vlc_object_destroy() will be invoked before a concurrent
* FIND_PARENT gets the chance to crash the process. */
for (int i = 0; i < p_this->i_children; i++) for (int i = 0; i < p_this->i_children; i++)
p_this->pp_children[i]->p_parent = NULL; p_this->pp_children[i]->p_parent = NULL;
#endif
} }
vlc_mutex_unlock( &structure_lock ); 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