]> git.sesse.net Git - vlc/blobdiff - modules/gui/wxwidgets/dialogs/bookmarks.cpp
Replace vlc_object_find() and vlc_object_release() of VLC_OBJECT_PLAYLIST with pl_Yie...
[vlc] / modules / gui / wxwidgets / dialogs / bookmarks.cpp
index e2f138c4e8ae2a87d03ba04f3a2118de3ed045a7..13dfa1d45d29f3fb3ed36aba452070f95e284d07 100644 (file)
@@ -204,28 +204,24 @@ BookmarksDialog::BookmarksDialog( intf_thread_t *_p_intf, wxWindow *p_parent )
     main_sizer->Add( main_panel, 1, wxEXPAND );
     SetSizer( main_sizer );
 
-    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 )
     {
        /* Some global changes happened -> Rebuild all */
        var_AddCallback( p_playlist, "playlist-current",
                         PlaylistChanged, this );
-       vlc_object_release( p_playlist );
+       pl_Release( p_playlist );
     }
 }
 
 BookmarksDialog::~BookmarksDialog()
 {
-    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 )
     {
        var_DelCallback( p_playlist, "playlist-current",
                         PlaylistChanged, this );
-       vlc_object_release( p_playlist );
+       pl_Release( p_playlist );
     }
 }