Skip to content

Commit

Permalink
Merge pull request #86 from foursquare/check-nil-url
Browse files Browse the repository at this point in the history
Guard against nil url in category methods
  • Loading branch information
garrettmoon committed Oct 28, 2015
2 parents a1faca7 + 836223b commit 49239f6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Pod/Classes/Image Categories/UIButton+PINRemoteImage.m
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ - (void)pin_setImageFromURL:(NSURL *)url processorKey:(NSString *)processorKey p

- (void)pin_setImageFromURL:(NSURL *)url placeholderImage:(UIImage *)placeholderImage processorKey:(NSString *)processorKey processor:(PINRemoteImageManagerImageProcessor)processor completion:(PINRemoteImageManagerImageCompletion)completion
{
[PINRemoteImageCategoryManager setImageOnView:self fromURLs:@[url] placeholderImage:placeholderImage processorKey:processorKey processor:processor completion:completion];
[PINRemoteImageCategoryManager setImageOnView:self fromURLs:url?@[url]:nil placeholderImage:placeholderImage processorKey:processorKey processor:processor completion:completion];
}

- (void)pin_setImageFromURLs:(NSArray *)urls
Expand Down
2 changes: 1 addition & 1 deletion Pod/Classes/Image Categories/UIImageView+PINRemoteImage.m
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ - (void)pin_setImageFromURL:(NSURL *)url processorKey:(NSString *)processorKey p

- (void)pin_setImageFromURL:(NSURL *)url placeholderImage:(UIImage *)placeholderImage processorKey:(NSString *)processorKey processor:(PINRemoteImageManagerImageProcessor)processor completion:(PINRemoteImageManagerImageCompletion)completion
{
[PINRemoteImageCategoryManager setImageOnView:self fromURLs:@[url] placeholderImage:placeholderImage processorKey:processorKey processor:processor completion:completion];
[PINRemoteImageCategoryManager setImageOnView:self fromURLs:url?@[url]:nil placeholderImage:placeholderImage processorKey:processorKey processor:processor completion:completion];
}

- (void)pin_setImageFromURLs:(NSArray *)urls
Expand Down

0 comments on commit 49239f6

Please sign in to comment.