Commit 4ce15271 authored by Felix Paul Kühne's avatar Felix Paul Kühne

Fix runtime exception

(cherry picked from commit 9630628b)
parent 992c7f4b
......@@ -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