diff options
| author | Owen Lin <owenlin@google.com> | 2012-08-17 15:28:22 +0800 |
|---|---|---|
| committer | Owen Lin <owenlin@google.com> | 2012-08-17 15:28:22 +0800 |
| commit | bbe8bd33beb1ee7a01a55cca74624b36a7d25074 (patch) | |
| tree | e538c773f50ba015f2bc2a8584cdcf91d81952ee /src | |
| parent | c2b8e1c0906398cbdb5aea6bef67d71f3d36f25c (diff) | |
| download | android_packages_apps_Gallery2-bbe8bd33beb1ee7a01a55cca74624b36a7d25074.tar.gz android_packages_apps_Gallery2-bbe8bd33beb1ee7a01a55cca74624b36a7d25074.tar.bz2 android_packages_apps_Gallery2-bbe8bd33beb1ee7a01a55cca74624b36a7d25074.zip | |
Fix NPE when view a single photo.
bug: 6995776
Change-Id: Iba213dfefcab04f2c856f55dc3446e3314f30a6f
Diffstat (limited to 'src')
| -rw-r--r-- | src/com/android/gallery3d/actionbar/SystemActionBarWrapper.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/com/android/gallery3d/actionbar/SystemActionBarWrapper.java b/src/com/android/gallery3d/actionbar/SystemActionBarWrapper.java index 3c4dac5ae..2d70aa609 100644 --- a/src/com/android/gallery3d/actionbar/SystemActionBarWrapper.java +++ b/src/com/android/gallery3d/actionbar/SystemActionBarWrapper.java @@ -169,18 +169,21 @@ public class SystemActionBarWrapper implements ActionBarInterface { @Override public void setMenuItemVisible(int menuItemId, boolean visible) { + if (mMenu == null) return; MenuItem item = mMenu.findItem(menuItemId); if (item != null) item.setVisible(visible); } @Override public void setMenuItemTitle(int menuItemId, String title) { + if (mMenu == null) return; MenuItem item = mMenu.findItem(menuItemId); if (item != null) item.setTitle(title); } @Override public void setMenuItemIntent(int menuItemId, Intent intent) { + if (mMenu == null) return; MenuItem item = mMenu.findItem(menuItemId); if (item != null) item.setIntent(intent); } |
