Merge "ImageLoader: setError after null check"
diff --git a/src/com/android/volley/toolbox/ImageLoader.java b/src/com/android/volley/toolbox/ImageLoader.java
index c5f52a0..fe0f32a 100644
--- a/src/com/android/volley/toolbox/ImageLoader.java
+++ b/src/com/android/volley/toolbox/ImageLoader.java
@@ -275,10 +275,10 @@
// Remove this request from the list of in-flight requests.
BatchedImageRequest request = mInFlightRequests.remove(cacheKey);
- // Set the error for this request
- request.setError(error);
-
if (request != null) {
+ // Set the error for this request
+ request.setError(error);
+
// Send the batched response
batchResponse(cacheKey, request);
}