diff --git a/QBImagePicker/QBAlbumsViewController.m b/QBImagePicker/QBAlbumsViewController.m index a08dfe28..d16bf70c 100644 --- a/QBImagePicker/QBAlbumsViewController.m +++ b/QBImagePicker/QBAlbumsViewController.m @@ -307,7 +307,7 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N contentMode:PHImageContentModeAspectFill options:nil resultHandler:^(UIImage *result, NSDictionary *info) { - if (cell.tag == indexPath.row) { + if (result && cell.tag == indexPath.row) { cell.imageView3.image = result; } }]; @@ -323,7 +323,7 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N contentMode:PHImageContentModeAspectFill options:nil resultHandler:^(UIImage *result, NSDictionary *info) { - if (cell.tag == indexPath.row) { + if (result && cell.tag == indexPath.row) { cell.imageView2.image = result; } }]; @@ -337,7 +337,7 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N contentMode:PHImageContentModeAspectFill options:nil resultHandler:^(UIImage *result, NSDictionary *info) { - if (cell.tag == indexPath.row) { + if (result && cell.tag == indexPath.row) { cell.imageView1.image = result; } }]; diff --git a/QBImagePicker/QBAssetsViewController.m b/QBImagePicker/QBAssetsViewController.m index 9fd1a170..3010f66b 100644 --- a/QBImagePicker/QBAssetsViewController.m +++ b/QBImagePicker/QBAssetsViewController.m @@ -457,7 +457,7 @@ - (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cell contentMode:PHImageContentModeAspectFill options:nil resultHandler:^(UIImage *result, NSDictionary *info) { - if (cell.tag == indexPath.item) { + if (result && cell.tag == indexPath.item) { cell.imageView.image = result; } }];