Commit cf2c0f1a authored by yuzheng's avatar yuzheng

fix: don't access album cover when album is empty

parent 3357eab3
......@@ -412,6 +412,9 @@ static dispatch_once_t onceToken;
if (!self.sortAscendingByModificationDate) {
asset = [model.result firstObject];
}
if (!asset) {
return -1;
}
return [[TZImageManager manager] getPhotoWithAsset:asset photoWidth:80 completion:^(UIImage *photo, NSDictionary *info, BOOL isDegraded) {
if (completion) completion(photo);
}];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment