File tree 1 file changed +5
-0
lines changed
library/src/com/nostra13/universalimageloader/core/decode
1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -43,6 +43,7 @@ public class BaseImageDecoder implements ImageDecoder {
43
43
protected static final String LOG_SCALE_IMAGE = "Scale subsampled image (%1$s) to %2$s (scale = %3$.5f) [%4$s]" ;
44
44
protected static final String LOG_ROTATE_IMAGE = "Rotate image on %1$d\u00B0 [%2$s]" ;
45
45
protected static final String LOG_FLIP_IMAGE = "Flip image horizontally [%s]" ;
46
+ protected static final String ERROR_NO_IMAGE_STREAM = "No stream for image [%s]" ;
46
47
protected static final String ERROR_CANT_DECODE_IMAGE = "Image can't be decoded [%s]" ;
47
48
48
49
protected final boolean loggingEnabled ;
@@ -71,6 +72,10 @@ public Bitmap decode(ImageDecodingInfo decodingInfo) throws IOException {
71
72
ImageFileInfo imageInfo ;
72
73
73
74
InputStream imageStream = getImageStream (decodingInfo );
75
+ if (imageStream == null ) {
76
+ L .e (ERROR_NO_IMAGE_STREAM , decodingInfo .getImageKey ());
77
+ return null ;
78
+ }
74
79
try {
75
80
imageInfo = defineImageSizeAndRotation (imageStream , decodingInfo );
76
81
imageStream = resetStream (imageStream , decodingInfo );
You can’t perform that action at this time.
0 commit comments