Playlist: Add safety checks to update total length
Update total length had a mysterious crash for some user, hopefully this will fix it. Signed-off-by: Christopher Snowhill <kode54@gmail.com>
This commit is contained in:
parent
93739d5a0d
commit
d32ccd3d1e
1 changed files with 3 additions and 1 deletions
|
@ -374,7 +374,9 @@ static void *playlistControllerContext = &playlistControllerContext;
|
|||
ldiv_t weeksAndDays;
|
||||
|
||||
for(PlaylistEntry *pe in [self arrangedObjects]) {
|
||||
if(!isnan([pe.length doubleValue])) tt += [pe.length doubleValue];
|
||||
if(pe && !pe.deLeted && pe.length) {
|
||||
if(!isnan([pe.length doubleValue])) tt += [pe.length doubleValue];
|
||||
}
|
||||
}
|
||||
|
||||
long sec = (long)(tt);
|
||||
|
|
Loading…
Reference in a new issue