diff options
Diffstat (limited to 'src/main/java/com/android/volley/toolbox/ImageRequest.java')
-rw-r--r-- | src/main/java/com/android/volley/toolbox/ImageRequest.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/main/java/com/android/volley/toolbox/ImageRequest.java b/src/main/java/com/android/volley/toolbox/ImageRequest.java index d663f5f..0f33cd8 100644 --- a/src/main/java/com/android/volley/toolbox/ImageRequest.java +++ b/src/main/java/com/android/volley/toolbox/ImageRequest.java @@ -46,7 +46,7 @@ public class ImageRequest extends Request<Bitmap> { private final Config mDecodeConfig; private final int mMaxWidth; private final int mMaxHeight; - private ScaleType mScaleType; + private final ScaleType mScaleType; /** Decoding lock so that we don't decode more than one image at a time (to avoid OOM's) */ private static final Object sDecodeLock = new Object(); @@ -216,7 +216,9 @@ public class ImageRequest extends Request<Bitmap> { @Override protected void deliverResponse(Bitmap response) { - mListener.onResponse(response); + if (mListener != null) { + mListener.onResponse(response); + } } /** |