GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Add some sanity check on the URL parameter · lucomim/SDWebImage@ddd03f7

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • SDWebImage
    • SDWebImageManager.m
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎SDWebImage/SDWebImageManager.m‎

Copy file name to clipboardExpand all lines: SDWebImage/SDWebImageManager.m
+6Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,12 @@ - (NSString *)cacheKeyForURL:(NSURL *)url
6969
url = [NSURL URLWithString:(NSString *)url];
7070
}
7171

72+
// Prevents app crashing on argument type error like sending NSNull instead of NSURL
73+
if (![url isKindOfClass:NSURL.class])
74+
{
75+
url = nil;
76+
}
77+
7278
__block SDWebImageCombinedOperation *operation = SDWebImageCombinedOperation.new;
7379

7480
if (!url || !completedBlock || (!(options & SDWebImageRetryFailed) && [self.failedURLs containsObject:url]))

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.