From 7148ec4b900fcf3cd9c1f148992313d584557f72 Mon Sep 17 00:00:00 2001 From: George Mount Date: Wed, 10 Oct 2012 16:59:45 -0700 Subject: Fix NPE due to progress bar not existing. Bug 7325685 Change-Id: I5e24b4f8a0ee4016c122e14702e3ae575f5bb56f --- src/com/android/gallery3d/app/PhotoPage.java | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'src/com') diff --git a/src/com/android/gallery3d/app/PhotoPage.java b/src/com/android/gallery3d/app/PhotoPage.java index d6723ca51..2e19a2ba8 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); + } } } } -- cgit v1.2.3