When an Android device is plugged with MTP disabled, the tracks may not
be retrieved.
In that branch of code, pp_items was never initialized, so the behavior
was undefined in CloseDevice() (on device unplug), often causing a
segfault.
Initialize it to NULL to fix the problem.
Signed-off-by: Romain Vimont <rom@rom1v.com>
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
CountTracks, p_sd ) ) == NULL )
{
msg_Warn( p_sd, "No tracks on the device" );
+ p_sd->p_sys->pp_items = NULL;
}
else
{