Skip to content
This repository was archived by the owner on Jun 19, 2025. It is now read-only.

Commit a426fe8

Browse files
authored
Merge pull request #361 from wordpress-mobile/fix/ios-14-asset-crash
[iOS 14] Handle nil assetCollection and prevent crash
2 parents 2fd8cd1 + 3d92891 commit a426fe8

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

Example/Podfile.lock

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
PODS:
2-
- WPMediaPicker (1.7.1-beta.1)
2+
- WPMediaPicker (1.7.2)
33

44
DEPENDENCIES:
55
- WPMediaPicker (from `../`)
@@ -9,8 +9,8 @@ EXTERNAL SOURCES:
99
:path: "../"
1010

1111
SPEC CHECKSUMS:
12-
WPMediaPicker: 1b770d4d4f14fbfb7c421c53c761a521fc23bf12
12+
WPMediaPicker: d5ae9a83cd5cc0e4de46bfc1c59120aa86658bc3
1313

1414
PODFILE CHECKSUM: 6b0e391139d3864c72fde997a1418dbfe9bf5126
1515

16-
COCOAPODS: 1.8.4
16+
COCOAPODS: 1.9.3

Pod/Classes/WPPHAssetDataSource.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ - (void)loadGroupsWithSuccess:(WPMediaSuccessBlock)successBlock
229229
dispatchQueue: self.imageGenerationQueue]];
230230
}
231231
self.cachedCollections = newCachedAssetCollection;
232-
if (self.assetsCollections.count > 0){
232+
if (self.assetsCollections != nil){
233233
if (!self.activeAssetsCollection || [self.assetsCollections indexOfObject:self.activeAssetsCollection] == NSNotFound) {
234234
self.activeAssetsCollection = [self.assetsCollections firstObject];
235235
}

WPMediaPicker.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = "WPMediaPicker"
3-
s.version = "1.7.1"
3+
s.version = "1.7.2"
44
s.summary = "WPMediaPicker is an iOS controller that allows capture and picking of media assets."
55
s.description = <<-DESC
66
WPMediaPicker is an iOS controller that allows capture and picking of media assets.

0 commit comments

Comments
 (0)