From 21565dbc8faca02cb1ea94b77ed79e48802c3e2c Mon Sep 17 00:00:00 2001 From: zhongwuzw Date: Wed, 20 Mar 2019 11:21:04 +0800 Subject: [PATCH] Add assert to check operation nil --- SDWebImage/SDWebImagePrefetcher.m | 1 + 1 file changed, 1 insertion(+) diff --git a/SDWebImage/SDWebImagePrefetcher.m b/SDWebImage/SDWebImagePrefetcher.m index c40055ec..0540bab4 100644 --- a/SDWebImage/SDWebImagePrefetcher.m +++ b/SDWebImage/SDWebImagePrefetcher.m @@ -140,6 +140,7 @@ } [asyncOperation complete]; }]; + NSAssert(operation != nil, @"Operation should not be nil, [SDWebImageManager loadImageWithURL:options:context:progress:completed:] break prefetch logic"); @synchronized (token) { [operations addPointer:(__bridge void *)operation]; }