Skip to content

Commit

Permalink
Merge pull request #361 from wordpress-mobile/fix/ios-14-asset-crash
Browse files Browse the repository at this point in the history
[iOS 14] Handle nil assetCollection and prevent crash
  • Loading branch information
frosty authored Oct 1, 2020
2 parents 2fd8cd1 + 3d92891 commit a426fe8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions Example/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
PODS:
- WPMediaPicker (1.7.1-beta.1)
- WPMediaPicker (1.7.2)

DEPENDENCIES:
- WPMediaPicker (from `../`)
Expand All @@ -9,8 +9,8 @@ EXTERNAL SOURCES:
:path: "../"

SPEC CHECKSUMS:
WPMediaPicker: 1b770d4d4f14fbfb7c421c53c761a521fc23bf12
WPMediaPicker: d5ae9a83cd5cc0e4de46bfc1c59120aa86658bc3

PODFILE CHECKSUM: 6b0e391139d3864c72fde997a1418dbfe9bf5126

COCOAPODS: 1.8.4
COCOAPODS: 1.9.3
2 changes: 1 addition & 1 deletion Pod/Classes/WPPHAssetDataSource.m
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ - (void)loadGroupsWithSuccess:(WPMediaSuccessBlock)successBlock
dispatchQueue: self.imageGenerationQueue]];
}
self.cachedCollections = newCachedAssetCollection;
if (self.assetsCollections.count > 0){
if (self.assetsCollections != nil){
if (!self.activeAssetsCollection || [self.assetsCollections indexOfObject:self.activeAssetsCollection] == NSNotFound) {
self.activeAssetsCollection = [self.assetsCollections firstObject];
}
Expand Down
2 changes: 1 addition & 1 deletion WPMediaPicker.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "WPMediaPicker"
s.version = "1.7.1"
s.version = "1.7.2"
s.summary = "WPMediaPicker is an iOS controller that allows capture and picking of media assets."
s.description = <<-DESC
WPMediaPicker is an iOS controller that allows capture and picking of media assets.
Expand Down

0 comments on commit a426fe8

Please sign in to comment.