OSDN Git Service

Fix Monkey NPE
authorJohn Reck <jreck@google.com>
Thu, 27 Sep 2012 22:26:00 +0000 (15:26 -0700)
committerJohn Reck <jreck@google.com>
Thu, 27 Sep 2012 22:26:00 +0000 (15:26 -0700)
 Bug: 7243032

Change-Id: I0e8757e6108f2e86bf4608b1535b1c528f2f3197

src/com/android/gallery3d/app/PhotoPage.java

index 86e62a3..49d1e6e 100644 (file)
@@ -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();