From 28eb1b4b5cad170c96c1bd8ec7a492a9edab2b73 Mon Sep 17 00:00:00 2001 From: zhongwuzw Date: Mon, 9 Jul 2018 16:32:47 +0800 Subject: [PATCH] Fix crash when assign request property of SDWebImageDownloadToken --- SDWebImage/SDWebImageDownloader.h | 4 ++-- SDWebImage/SDWebImageDownloader.m | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/SDWebImage/SDWebImageDownloader.h b/SDWebImage/SDWebImageDownloader.h index 4996f7c0..351d57d1 100644 --- a/SDWebImage/SDWebImageDownloader.h +++ b/SDWebImage/SDWebImageDownloader.h @@ -109,12 +109,12 @@ typedef SDImageLoaderCompletedBlock SDWebImageDownloaderCompletedBlock; /** The download's request. */ -@property (nonatomic, copy, nullable, readonly) NSURLRequest *request; +@property (nonatomic, strong, nullable, readonly) NSURLRequest *request; /** The download's response. */ -@property (nonatomic, copy, nullable, readonly) NSURLResponse *response; +@property (nonatomic, strong, nullable, readonly) NSURLResponse *response; @end diff --git a/SDWebImage/SDWebImageDownloader.m b/SDWebImage/SDWebImageDownloader.m index cc17dd89..8e0f89bb 100644 --- a/SDWebImage/SDWebImageDownloader.m +++ b/SDWebImage/SDWebImageDownloader.m @@ -19,8 +19,8 @@ static void * SDWebImageDownloaderContext = &SDWebImageDownloaderContext; @interface SDWebImageDownloadToken () @property (nonatomic, strong, nullable, readwrite) NSURL *url; -@property (nonatomic, copy, nullable, readwrite) NSURLRequest *request; -@property (nonatomic, copy, nullable, readwrite) NSURLResponse *response; +@property (nonatomic, strong, nullable, readwrite) NSURLRequest *request; +@property (nonatomic, strong, nullable, readwrite) NSURLResponse *response; @property (nonatomic, strong, nullable, readwrite) id downloadOperationCancelToken; @property (nonatomic, weak, nullable) NSOperation *downloadOperation; @property (nonatomic, weak, nullable) SDWebImageDownloader *downloader;