Skip to content

Commit 49239f6

Browse files
committed
Merge pull request #86 from foursquare/check-nil-url
Guard against nil url in category methods
2 parents a1faca7 + 836223b commit 49239f6

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Pod/Classes/Image Categories/UIButton+PINRemoteImage.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ - (void)pin_setImageFromURL:(NSURL *)url processorKey:(NSString *)processorKey p
4747

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

5353
- (void)pin_setImageFromURLs:(NSArray *)urls

Pod/Classes/Image Categories/UIImageView+PINRemoteImage.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ - (void)pin_setImageFromURL:(NSURL *)url processorKey:(NSString *)processorKey p
4747

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

5353
- (void)pin_setImageFromURLs:(NSArray *)urls

0 commit comments

Comments
 (0)