Bug Fix: Playlist item out of range

This should never happen. But apparently it did.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
This commit is contained in:
Christopher Snowhill 2025-02-23 16:40:40 -08:00
parent ced4d73fd6
commit a744963548

View file

@ -437,6 +437,11 @@ static void *playlistControllerContext = &playlistControllerContext;
}
- (NSView *_Nullable)tableView:(NSTableView *)tableView viewForTableColumn:(NSTableColumn *_Nullable)tableColumn row:(NSInteger)row {
// What the heck
if(row < 0 || row >= [[self arrangedObjects] count]) {
return nil;
}
NSImage *cellImage = nil;
NSString *cellText = @"";
NSString *cellIdentifier = @"";