From: John Reck Date: Thu, 27 Sep 2012 22:26:00 +0000 (-0700) Subject: Fix Monkey NPE X-Git-Tag: android-x86-6.0-r3~2044^2~1040^2 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=6bc3fdbb2dd48d74428aa0de57d725a65d68e2f5;p=android-x86%2Fpackages-apps-Camera2.git Fix Monkey NPE Bug: 7243032 Change-Id: I0e8757e6108f2e86bf4608b1535b1c528f2f3197 --- 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();