]> git.sesse.net Git - vlc/blobdiff - src/playlist/engine.c
playlist: Be a good citizen and kill the thread before releasing fetcher and parser.
[vlc] / src / playlist / engine.c
index 90b552663a5667b5001daee45de00f941dc429dd..45b95cce9227e4c886f2a5dc59e293ea46c79c67 100644 (file)
@@ -169,11 +169,18 @@ static void playlist_Destructor( vlc_object_t * p_this )
     playlist_t * p_playlist = (playlist_t *)p_this;
 
     if( p_playlist->p_preparse )
+    {
+        vlc_object_kill( p_playlist->p_preparse );
+        vlc_thread_join( p_playlist->p_preparse );
         vlc_object_release( p_playlist->p_preparse );
+    }
 
     if( p_playlist->p_fetcher )
+    {
+        vlc_object_kill( p_playlist->p_fetcher );
+        vlc_thread_join( p_playlist->p_fetcher );
         vlc_object_release( p_playlist->p_fetcher );
-
+    }
     msg_Dbg( p_this, "Destroyed" );
 }