Commit d43ddc3a authored by Felix Paul Kühne's avatar Felix Paul Kühne

Fix runtime exception

(cherry picked from commit 4f76a13c)
parent dac4d8dc
......@@ -117,7 +117,11 @@
-(void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath
self.mediaPlayer.currentAudioTrackIndex = [self.mediaPlayer.audioTrackIndexes[indexPath.row] intValue];
NSArray *audioTrackIndexes = self.mediaPlayer.audioTrackIndexes;
NSInteger row = indexPath.row;
if (row < audioTrackIndexes.count) {
self.mediaPlayer.currentAudioTrackIndex = [audioTrackIndexes[row] intValue];
[collectionView reloadData];
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment