[Playlist] Fix refresh handling range

Apparently, somehow, indexes in obscene ranges hit this code, and cause
exceptions. Strange.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
swiftingly
Christopher Snowhill 2022-06-18 15:50:25 -07:00
parent 4a269f05a1
commit 54b102f09e
1 changed files with 2 additions and 2 deletions

View File

@ -1310,8 +1310,8 @@ static inline void dispatch_sync_reentrant(dispatch_queue_t queue, dispatch_bloc
NSMutableIndexSet *refreshSet = [[NSMutableIndexSet alloc] init];
if(currentEntry != nil && !currentEntry.deLeted) [refreshSet addIndex:currentEntry.index];
if(pe != nil) [refreshSet addIndex:pe.index];
if(currentEntry != nil && !currentEntry.deLeted && currentEntry.index < NSNotFound) [refreshSet addIndex:currentEntry.index];
if(pe != nil && !pe.deLeted && pe.index < NSNotFound) [refreshSet addIndex:pe.index];
// Refresh entire row to refresh tooltips
unsigned long columns = [[self.tableView tableColumns] count];