From 54b102f09e94aa22d2e398bce96ba7552390b25f Mon Sep 17 00:00:00 2001 From: Christopher Snowhill Date: Sat, 18 Jun 2022 15:50:25 -0700 Subject: [PATCH] [Playlist] Fix refresh handling range Apparently, somehow, indexes in obscene ranges hit this code, and cause exceptions. Strange. Signed-off-by: Christopher Snowhill --- Playlist/PlaylistController.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Playlist/PlaylistController.m b/Playlist/PlaylistController.m index eb37ce0dd..4f806d3ed 100644 --- a/Playlist/PlaylistController.m +++ b/Playlist/PlaylistController.m @@ -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];