修复了数组可能越界的问题

This commit is contained in:
fengshuo
2022-11-11 17:46:37 +08:00
parent e855f87849
commit c22ede0a13
146 changed files with 515 additions and 371 deletions

View File

@@ -20,6 +20,7 @@
#import "Api+Room.h"
#import "DESEncrypt.h"
#import "StatisticsServiceHelper.h"
#import "NSArray+Safe.h"
///Model
#import "RoomInfoModel.h"
#import "UserInfoModel.h"
@@ -1597,7 +1598,7 @@ NSString * const kHadQuitOtherRoomKey = @"kHadQuitOtherRoomKey";//是否退出
[self.view endEditing:YES];
[self showAnchorLoading];
if (self.anchorIndex < self.anchorRoomList.count) {
NSString * roomUid = [self.anchorRoomList objectAtIndex:self.anchorIndex];
NSString * roomUid = [self.anchorRoomList safeObjectAtIndex1:self.anchorIndex];
[self.presenter getCurrentRoomInfo:roomUid];
self.anchorIndex --;
}else {