]> git.sesse.net Git - vlc/blobdiff - src/interface/interaction.c
Remove vlc_object_find for playlist from the core
[vlc] / src / interface / interaction.c
index 09cbd2437cd9268fc021abf424789b1825a0aee8..6b884b1fff2994b40581c06b45e884c954b386d0 100644 (file)
@@ -445,20 +445,17 @@ void __intf_UserHide( vlc_object_t *p_this, int i_id )
 /* Get the interaction object. Create it if needed */
 static interaction_t * InteractionGet( vlc_object_t *p_this )
 {
-    playlist_t *p_playlist;
     interaction_t *p_interaction;
+    playlist_t *p_playlist = pl_Yield( p_this );
 
-    p_playlist = (playlist_t*) vlc_object_find( p_this, VLC_OBJECT_PLAYLIST,
-                                                FIND_ANYWHERE );
-    if( !p_playlist )
-        return NULL;
-
+    PL_LOCK;
     if( p_playlist->p_interaction == NULL )
        InteractionInit( p_playlist );
 
     p_interaction = p_playlist->p_interaction;
+    PL_UNLOCK;
 
-    vlc_object_release( p_playlist );
+    pl_Release( p_this );
     return p_interaction;
 }