fix race condition which leads to crash
This commit is contained in:
parent
3e26b32e9c
commit
207c244c4b
@ -330,6 +330,10 @@ static NSString * const CustomCellReuseIdentifier = @"CustomCell";
|
||||
|
||||
}
|
||||
|
||||
if ([self.galleryData.data count] < cellIndex) {
|
||||
return nil;
|
||||
}
|
||||
|
||||
NSDictionary *assetDictionary = (NSDictionary*)self.galleryData.data[cellIndex];
|
||||
PHAsset *asset = assetDictionary[@"asset"];
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user