-#ifndef NDEBUG
- /* Reparenting an object carries a risk of invalid access to the parent,
- * from another thread. This can happen when inheriting a variable, or
- * through any direct access to vlc_object_t.p_parent. Also, reparenting
- * brings a functional bug, whereby the reparented object uses incorrect
- * old values for inherited variables (as the new parent may have different
- * variable values, especially if it is an input).
- * Note that the old parent may be already destroyed.
- * So its pointer must not be dereferenced.
- */
- if (priv->old_parent)
- msg_Info (p_this, "Reparenting an object is dangerous (%p -> %p)!",
- priv->old_parent, p_parent);
-#endif
-
- p_old_parent = p_this->p_parent;
- if (p_old_parent)
- vlc_object_detach_unlocked (p_this);