summaryrefslogtreecommitdiffstats
path: root/src/com/android/gallery3d/app
diff options
context:
space:
mode:
authorWei Huang <weih@google.com>2011-08-30 11:33:24 -0700
committerWei Huang <weih@google.com>2011-08-30 11:37:58 -0700
commitea80ff93b6070ff671da46d6078cdf753cc6f8c3 (patch)
tree10c6009de1f621783aba06d040121e37a387751a /src/com/android/gallery3d/app
parent0ba0e9e5e4bae838e0cce29a509f875b434a0542 (diff)
downloadandroid_packages_apps_Snap-ea80ff93b6070ff671da46d6078cdf753cc6f8c3.tar.gz
android_packages_apps_Snap-ea80ff93b6070ff671da46d6078cdf753cc6f8c3.tar.bz2
android_packages_apps_Snap-ea80ff93b6070ff671da46d6078cdf753cc6f8c3.zip
bug #5234237: fix NPE in Gallery
- mActivity.getGalleryActionBar() can return null, check for null before using it. Change-Id: Ib84d5d56e51e6098adee9323c5e8d5c78f9a76e8
Diffstat (limited to 'src/com/android/gallery3d/app')
-rw-r--r--src/com/android/gallery3d/app/AlbumSetPage.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/com/android/gallery3d/app/AlbumSetPage.java b/src/com/android/gallery3d/app/AlbumSetPage.java
index 6542be1d2..958f9b21d 100644
--- a/src/com/android/gallery3d/app/AlbumSetPage.java
+++ b/src/com/android/gallery3d/app/AlbumSetPage.java
@@ -257,8 +257,11 @@ public class AlbumSetPage extends ActivityState implements
mSubtitle = data.getString(AlbumSetPage.KEY_SET_SUBTITLE);
mEyePosition = new EyePosition(mActivity.getAndroidContext(), this);
mDetailsSource = new MyDetailsSource();
- mActivity.getGalleryActionBar().setSelectedTab(data.getInt(
- AlbumSetPage.KEY_SELECTED_TAB_TYPE, FilterUtils.CLUSTER_BY_ALBUM));
+ GalleryActionBar actionBar = mActivity.getGalleryActionBar();
+ if (actionBar != null) {
+ actionBar.setSelectedTab(data.getInt(
+ AlbumSetPage.KEY_SELECTED_TAB_TYPE, FilterUtils.CLUSTER_BY_ALBUM));
+ }
startTransition();
}