summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Reck <jreck@google.com>2012-09-27 15:26:00 -0700
committerJohn Reck <jreck@google.com>2012-09-27 15:26:00 -0700
commit53fe9f72433f2fdae30e1708c5933390202cbcf5 (patch)
treee6e79e5d6a09c6fbecc6cc3a4e51d1b63b3937b2
parent8f6dc9eab9feca563b08400a7ebd74fb5d0e3075 (diff)
downloadandroid_packages_apps_Gallery2-53fe9f72433f2fdae30e1708c5933390202cbcf5.tar.gz
android_packages_apps_Gallery2-53fe9f72433f2fdae30e1708c5933390202cbcf5.tar.bz2
android_packages_apps_Gallery2-53fe9f72433f2fdae30e1708c5933390202cbcf5.zip
Fix Monkey NPE
Bug: 7243032 Change-Id: I0e8757e6108f2e86bf4608b1535b1c528f2f3197
-rw-r--r--src/com/android/gallery3d/app/PhotoPage.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/com/android/gallery3d/app/PhotoPage.java b/src/com/android/gallery3d/app/PhotoPage.java
index 86e62a318..49d1e6ee7 100644
--- a/src/com/android/gallery3d/app/PhotoPage.java
+++ b/src/com/android/gallery3d/app/PhotoPage.java
@@ -553,7 +553,9 @@ public class PhotoPage extends ActivityState implements
setGridButtonVisibility(mPhotoView.getFilmMode());
MenuItem item = menu.findItem(R.id.action_slideshow);
- item.setVisible((mSecureAlbum == null) && canDoSlideShow());
+ if (item != null) {
+ item.setVisible((mSecureAlbum == null) && canDoSlideShow());
+ }
if (mCurrentPhoto == null) return;
int supportedOperations = mCurrentPhoto.getSupportedOperations();