summaryrefslogtreecommitdiffstats
path: root/src/com/android
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android')
-rw-r--r--src/com/android/camera/ViewImage.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/com/android/camera/ViewImage.java b/src/com/android/camera/ViewImage.java
index e28ccd8..9a78908 100644
--- a/src/com/android/camera/ViewImage.java
+++ b/src/com/android/camera/ViewImage.java
@@ -463,6 +463,13 @@ public class ViewImage extends Activity implements View.OnClickListener {
public void imageLoaded(int pos, int offset, Bitmap bitmap,
boolean isThumb) {
// shouldn't get here after onPause()
+
+ // We may get a result from a previous request. Ignore it.
+ if (pos != mCurrentPosition) {
+ bitmap.recycle();
+ return;
+ }
+
if (isThumb) {
mCache.put(pos + offset, bitmap);
}