Commit efe59af2faf24c78995da842847df9c0cd2dacb9

Authored by yanglingyu
1 parent 342f3f57

解决滑动过程中两侧切换闪退问题

CNLiveVideoClassifyKit/Classes/CNVideoList/Controller/CNVideoListsDetailController.m
... ... @@ -213,7 +213,9 @@ static NSString *const CNWitnessSearchVideoCellID = @"CNWitnessSearchVideoCell";
213 213 }
214 214 - (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath{
215 215 CNWitnessSearchVideoCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:CNWitnessSearchVideoCellID forIndexPath:indexPath];
216   - cell.model = self.dataSource[indexPath.row];
  216 + if (self.dataSource.count > indexPath.row) {
  217 + cell.model = self.dataSource[indexPath.row];
  218 + }
217 219 return cell;
218 220  
219 221 }
... ...