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

Commit f5eb8a4

Browse files
authored
Merge pull request #304 from wordpress-mobile/issue/9504-handle_nil_no_results_view_controller
Adding check for emptyViewController.
2 parents 9fffaa4 + e0ccf9c commit f5eb8a4

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

Pod/Classes/WPMediaPickerViewController.m

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -599,11 +599,11 @@ - (UILabel *)defaultEmptyView
599599

600600
- (void)addEmptyViewControllerToView
601601
{
602-
if (self.emptyViewController.view.superview == nil) {
602+
if (self.emptyViewController && self.emptyViewController.view.superview == nil) {
603603
[self.collectionView addSubview:self.emptyViewController.view];
604-
_emptyViewController.view.frame = self.collectionView.frame;
605-
[self addChildViewController:_emptyViewController];
606-
[_emptyViewController didMoveToParentViewController:self];
604+
self.emptyViewController.view.frame = self.collectionView.frame;
605+
[self addChildViewController:self.emptyViewController];
606+
[self.emptyViewController didMoveToParentViewController:self];
607607
[self centerEmptyView];
608608
}
609609
}

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.2"
3+
s.version = "1.3"
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)