Commit 540814c774f2bf89ed2e8e18b99281211e159c41
1 parent
1c0dde75
更改崩溃bug
Showing
1 changed file
with
2 additions
and
1 deletions
LiveVideoCloud/Classes/Sections/UGCSections/Controller/LVCUGCLivePlayerController.m
| @@ -733,7 +733,8 @@ | @@ -733,7 +733,8 @@ | ||
| 733 | _viewThird = [[UIView alloc] initWithFrame:CGRectMake(0, SCREEN_HEIGHT, SCREEN_WIDTH, SCREEN_HEIGHT)]; | 733 | _viewThird = [[UIView alloc] initWithFrame:CGRectMake(0, SCREEN_HEIGHT, SCREEN_WIDTH, SCREEN_HEIGHT)]; |
| 734 | _viewThird.backgroundColor = [UIColor blackColor]; | 734 | _viewThird.backgroundColor = [UIColor blackColor]; |
| 735 | _thirdLoadView = [[LVCUGCPlayerLoadingView alloc] initWithFrame:self.view.bounds]; | 735 | _thirdLoadView = [[LVCUGCPlayerLoadingView alloc] initWithFrame:self.view.bounds]; |
| 736 | - if (_index <= _playArray.count - 2 ) { | 736 | + NSInteger arrayCount = _playArray.count; |
| 737 | + if (_index <= (arrayCount - 2) ) { | ||
| 737 | [_thirdLoadView.bgImageView sd_setImageWithURL:[NSURL URLWithString:_playArray[_index+1].coverImgUrl] placeholderImage:_blurImage]; | 738 | [_thirdLoadView.bgImageView sd_setImageWithURL:[NSURL URLWithString:_playArray[_index+1].coverImgUrl] placeholderImage:_blurImage]; |
| 738 | } | 739 | } |
| 739 | [_viewThird addSubview:_thirdLoadView]; | 740 | [_viewThird addSubview:_thirdLoadView]; |