Skip to content
This repository has been archived by the owner on Apr 6, 2020. It is now read-only.

Commit

Permalink
Fix crash if there is no asset in folder
Browse files Browse the repository at this point in the history
  • Loading branch information
nek023 committed Apr 14, 2015
1 parent 631dbaf commit a4741c2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion QBImagePicker/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>3.1.0</string>
<string>3.1.1</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
Expand Down
6 changes: 4 additions & 2 deletions QBImagePicker/QBAssetsViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -370,8 +370,10 @@ - (NSArray *)assetsAtIndexPaths:(NSArray *)indexPaths

NSMutableArray *assets = [NSMutableArray arrayWithCapacity:indexPaths.count];
for (NSIndexPath *indexPath in indexPaths) {
PHAsset *asset = self.fetchResult[indexPath.item];
[assets addObject:asset];
if (indexPath.item < self.fetchResult.count) {
PHAsset *asset = self.fetchResult[indexPath.item];
[assets addObject:asset];
}
}
return assets;
}
Expand Down
2 changes: 1 addition & 1 deletion QBImagePickerController.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "QBImagePickerController"
s.version = "3.1.0"
s.version = "3.1.1"
s.summary = "A clone of UIImagePickerController with multiple selection support."
s.homepage = "https://github.com/questbeat/QBImagePicker"
s.license = "MIT"
Expand Down

0 comments on commit a4741c2

Please sign in to comment.