summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeorge Mount <mount@google.com>2012-10-10 17:03:10 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-10-10 17:03:10 -0700
commit38701573fefe46f7a5af8cdf2c6c7002ef2bcaa5 (patch)
treeee6f3c7159a71ff9912a3455a2020113699cda04
parentabbcbb11dbd5314780fa81ea80ed1caeb416f0fb (diff)
parent7148ec4b900fcf3cd9c1f148992313d584557f72 (diff)
downloadandroid_packages_apps_Snap-38701573fefe46f7a5af8cdf2c6c7002ef2bcaa5.zip
android_packages_apps_Snap-38701573fefe46f7a5af8cdf2c6c7002ef2bcaa5.tar.gz
android_packages_apps_Snap-38701573fefe46f7a5af8cdf2c6c7002ef2bcaa5.tar.bz2
Merge "Fix NPE due to progress bar not existing." into gb-ub-photos-arches
-rw-r--r--src/com/android/gallery3d/app/PhotoPage.java14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/com/android/gallery3d/app/PhotoPage.java b/src/com/android/gallery3d/app/PhotoPage.java
index d6723ca..2e19a2b 100644
--- a/src/com/android/gallery3d/app/PhotoPage.java
+++ b/src/com/android/gallery3d/app/PhotoPage.java
@@ -661,12 +661,14 @@ public class PhotoPage extends ActivityState implements
&& (photo.getSupportedOperations() & MediaItem.SUPPORT_SHARE) != 0) {
updateShareURI(photo.getPath());
}
- StitchingProgressManager progressManager = mApplication.getStitchingProgressManager();
- mProgressBar.hideProgress();
- if (progressManager != null && mCurrentPhoto instanceof LocalImage) {
- Integer progress = progressManager.getProgress(photo.getContentUri());
- if (progress != null) {
- mProgressBar.setProgress(progress);
+ if (mProgressBar != null) {
+ mProgressBar.hideProgress();
+ StitchingProgressManager progressManager = mApplication.getStitchingProgressManager();
+ if (progressManager != null && mCurrentPhoto instanceof LocalImage) {
+ Integer progress = progressManager.getProgress(photo.getContentUri());
+ if (progress != null) {
+ mProgressBar.setProgress(progress);
+ }
}
}
}