From 288725e54a486cc8a21ae9dad3877c8b70ee3bcc Mon Sep 17 00:00:00 2001 From: DreamPiggy Date: Mon, 17 Jun 2019 15:44:27 +0800 Subject: [PATCH] Fix the Clang Static Analysis warning of `addEntriesFromDictionary:` API --- SDWebImage/SDWebImageManager.m | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/SDWebImage/SDWebImageManager.m b/SDWebImage/SDWebImageManager.m index 250f6128..e06536e3 100644 --- a/SDWebImage/SDWebImageManager.m +++ b/SDWebImage/SDWebImageManager.m @@ -416,7 +416,9 @@ static id _defaultImageLoader; } if (mutableContext.count > 0) { - [mutableContext addEntriesFromDictionary:context]; + if (context) { + [mutableContext addEntriesFromDictionary:context]; + } context = [mutableContext copy]; }