]> git.sesse.net Git - vlc/blobdiff - modules/gui/wxwidgets/dialogs/bookmarks.cpp
Use pl_Release with the right argument.
[vlc] / modules / gui / wxwidgets / dialogs / bookmarks.cpp
index 5f6ebed466c812df3515d9c49ee176f4ccb2bcc0..864a86b59049d18a9c3ad881ed945879e11075c4 100644 (file)
@@ -118,7 +118,7 @@ BookmarkEditDialog::~BookmarkEditDialog()
 }
 void BookmarkEditDialog::OnOK( wxCommandEvent &event )
 {
-    if( p_seekpoint->psz_name ) free( p_seekpoint->psz_name );
+    free( p_seekpoint->psz_name );
     p_seekpoint->psz_name = strdup( name_text->GetValue().mb_str(wxConvUTF8) );
     p_seekpoint->i_byte_offset = atoi( bytes_text->GetValue().mb_str(wxConvUTF8) );
     p_seekpoint->i_time_offset =  1000000 *
@@ -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_intf );
     }
 }
 
 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_intf );
     }
 }