update_Delete: Fix update download thread destruction
[vlc.git] / src / misc / update.c
index 7cbaea0..914eaa5 100644 (file)
@@ -143,12 +143,12 @@ void update_Delete( update_t *p_update )
 
     if( p_update->p_check )
     {
-        assert( !p_update->p_download );
         vlc_object_kill( p_update->p_check );
         vlc_thread_join( p_update->p_check );
         vlc_object_release( p_update->p_check );
     }
-    else if( p_update->p_download )
+
+    if( p_update->p_download )
     {
         vlc_object_kill( p_update->p_download );
         vlc_thread_join( p_update->p_download );
@@ -732,8 +732,6 @@ end:
     free( p_buffer );
     free( psz_size );
 
-    p_udt->p_update->p_download = NULL;
-
     vlc_restorecancel( canc );
     return NULL;
 }