From 974141f5a279151f2016ccc9269b7f2918223375 Mon Sep 17 00:00:00 2001 From: Aleksandr Sychev Date: Mon, 15 Feb 2016 18:45:57 +0300 Subject: [PATCH] [fix] Issue #1423 --- SDWebImage/SDWebImageDecoder.m | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/SDWebImage/SDWebImageDecoder.m b/SDWebImage/SDWebImageDecoder.m index a7c02468..2d3b5e26 100644 --- a/SDWebImage/SDWebImageDecoder.m +++ b/SDWebImage/SDWebImageDecoder.m @@ -19,6 +19,11 @@ // when there are memory warning. // on iOS7, do not forget to call // [[SDImageCache sharedImageCache] clearMemory]; + + if (image == nil) { // Prevent "CGBitmapContextCreateImage: invalid context 0x0" error + return nil; + } + @autoreleasepool{ // do not decode animated images if (image.images) { return image; }