]> git.sesse.net Git - vlc/blobdiff - modules/gui/wince/dialogs.cpp
Use pl_Yield and pl_Release instead of vlc_object_find.
[vlc] / modules / gui / wince / dialogs.cpp
index e3d581144aa71dc77adbad336d09bf586e6334c5..1fa35cdbc82b72b72e9842818dc54144cd29e629 100644 (file)
@@ -332,8 +332,7 @@ void DialogsProvider::OnOpenFileSimple( int i_arg )
     TCHAR szFile[MAX_PATH] = _T("\0");
     static TCHAR szFilter[] = _T("All (*.*)\0*.*\0");
 
-    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;
 
     memset( &ofn, 0, sizeof(OPENFILENAME) );
@@ -367,7 +366,7 @@ void DialogsProvider::OnOpenFileSimple( int i_arg )
                       PLAYLIST_APPEND | (i_arg?PLAYLIST_GO:0), PLAYLIST_END );
     }
 
-    vlc_object_release( p_playlist );
+    pl_Release( p_playlist );
 }
 
 void DialogsProvider::OnOpenDirectory( int i_arg )
@@ -406,8 +405,7 @@ void DialogsProvider::OnOpenDirectory( int i_arg )
 
     if( !SUCCEEDED( SHGetMalloc(&p_malloc) ) ) goto error;
 
-    p_playlist = (playlist_t *)
-        vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST, FIND_ANYWHERE );
+    p_playlist = pl_Yield( p_intf );
     if( !p_playlist ) goto error;
 
     memset( &bi, 0, sizeof(BROWSEINFO) );
@@ -433,7 +431,7 @@ void DialogsProvider::OnOpenDirectory( int i_arg )
  error:
 
     if( p_malloc) p_malloc->Release();
-    if( p_playlist ) vlc_object_release( p_playlist );
+    if( p_playlist ) pl_Release( p_playlist );
 
 #ifdef UNDER_CE
     FreeLibrary( ceshell_dll );