]> git.sesse.net Git - vlc/blobdiff - modules/gui/wxwidgets/dialogs.cpp
Replace vlc_object_find() and vlc_object_release() of VLC_OBJECT_PLAYLIST with pl_Yie...
[vlc] / modules / gui / wxwidgets / dialogs.cpp
index 5bd482a41a1ce5df453b97bb3f46da6a7ee74eef..2204abf445f9d6a6ab1ba8c675a2c4eeb7d27e49 100644 (file)
@@ -435,9 +435,7 @@ void DialogsProvider::OnOpenFileGeneric( wxCommandEvent& event )
 
 void DialogsProvider::OnOpenFileSimple( wxCommandEvent& event )
 {
-    playlist_t *p_playlist =
-        (playlist_t *)vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
-                                       FIND_ANYWHERE );
+    playlist_t *p_playlist = pl_Yield( p_intf );
     if( p_playlist == NULL )
     {
         return;
@@ -473,15 +471,12 @@ void DialogsProvider::OnOpenFileSimple( wxCommandEvent& event )
             wxLocaleFree( psz_utf8 );
         }
     }
-
-    vlc_object_release( p_playlist );
+    pl_Release( p_playlist );
 }
 
 void DialogsProvider::OnOpenDirectory( wxCommandEvent& event )
 {
-    playlist_t *p_playlist =
-        (playlist_t *)vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
-                                       FIND_ANYWHERE );
+    playlist_t *p_playlist = pl_Yield( p_intf );
     if( p_playlist == NULL )
     {
         return;
@@ -499,8 +494,7 @@ void DialogsProvider::OnOpenDirectory( wxCommandEvent& event )
                       PLAYLIST_END, true, false );
         wxLocaleFree( psz_utf8 );
     }
-
-    vlc_object_release( p_playlist );
+    pl_Release( p_playlist );
 }
 
 void DialogsProvider::OnOpenFile( wxCommandEvent& event )