Commit 9630628b authored by Felix Paul Kühne's avatar Felix Paul Kühne

Fix runtime exception

parent d5d8dc6f
......@@ -104,7 +104,11 @@
{
VLCPlaybackInfoTVCollectionViewCell *trackCell = (VLCPlaybackInfoTVCollectionViewCell*)cell;
NSInteger row = indexPath.row;
BOOL isSelected = [self.mediaPlayer.audioTrackIndexes[row] intValue] == self.mediaPlayer.currentAudioTrackIndex;
BOOL isSelected = NO;
NSArray *audioTrackIndexes = self.mediaPlayer.audioTrackIndexes;
if (row < audioTrackIndexes.count) {
isSelected = [audioTrackIndexes[row] intValue] == self.mediaPlayer.currentAudioTrackIndex;
}
trackCell.selectionMarkerVisible = isSelected;
NSString *trackName = self.mediaPlayer.audioTrackNames[row];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment