diff --git a/Libraries/CameraRoll/RCTPhotoLibraryImageLoader.m b/Libraries/CameraRoll/RCTPhotoLibraryImageLoader.m index b99ac934fedc15..0c2adb7f5206df 100644 --- a/Libraries/CameraRoll/RCTPhotoLibraryImageLoader.m +++ b/Libraries/CameraRoll/RCTPhotoLibraryImageLoader.m @@ -44,7 +44,10 @@ - (RCTImageLoaderCancellationBlock)loadImageForURL:(NSURL *)imageURL // form of an, NSURL which is what assets-library uses. NSString *assetID = @""; PHFetchResult *results; - if ([imageURL.scheme caseInsensitiveCompare:@"assets-library"] == NSOrderedSame) { + if (!imageURL) { + completionHandler(RCTErrorWithMessage(@"Cannot load a photo library asset with no URL"), nil); + return ^{}; + } else if ([imageURL.scheme caseInsensitiveCompare:@"assets-library"] == NSOrderedSame) { assetID = [imageURL absoluteString]; results = [PHAsset fetchAssetsWithALAssetURLs:@[imageURL] options:nil]; } else {