summaryrefslogtreecommitdiffstats
path: root/photoviewer
diff options
context:
space:
mode:
Diffstat (limited to 'photoviewer')
-rw-r--r--photoviewer/src/com/android/ex/photo/PhotoViewActivity.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/photoviewer/src/com/android/ex/photo/PhotoViewActivity.java b/photoviewer/src/com/android/ex/photo/PhotoViewActivity.java
index 927b0e4..2e54569 100644
--- a/photoviewer/src/com/android/ex/photo/PhotoViewActivity.java
+++ b/photoviewer/src/com/android/ex/photo/PhotoViewActivity.java
@@ -303,6 +303,10 @@ public class PhotoViewActivity extends Activity implements
new Handler().post(new Runnable() {
@Override
public void run() {
+ // If the cursor is closed, we can leave, as another runnable will have
+ // been posted (this means our Cursor is already out-of-date)
+ if (data.isClosed()) return;
+
// We're paused; don't do anything now, we'll get re-invoked
// when the activity becomes active again
if (mIsPaused) {