From 3264f438f6787adcb875b2611b5c20c0b833ec5e Mon Sep 17 00:00:00 2001 From: Ray Chen Date: Mon, 19 Sep 2011 14:20:18 +0800 Subject: [PATCH] Fix 5329642 Gallery crashes when viewing Details on certain photos AddressResolvingListener (mAdapter) is not set until constructor returns, so NPE is thrown if the resolving happens really fast. This CL uses 'this' instead of mAdapter. Change-Id: Ifce0ea92a3eb5c794a73cf0e89a236ff3d948c18 --- src/com/android/gallery3d/ui/DialogDetailsView.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/com/android/gallery3d/ui/DialogDetailsView.java b/src/com/android/gallery3d/ui/DialogDetailsView.java index 07ebc3c2c..adc9de11d 100644 --- a/src/com/android/gallery3d/ui/DialogDetailsView.java +++ b/src/com/android/gallery3d/ui/DialogDetailsView.java @@ -146,7 +146,7 @@ public class DialogDetailsView implements DetailsViewContainer { case MediaDetails.INDEX_LOCATION: { double[] latlng = (double[]) detail.getValue(); mLocationIndex = mItems.size(); - value = DetailsHelper.resolveAddress(mContext, latlng, mAdapter); + value = DetailsHelper.resolveAddress(mContext, latlng, this); break; } case MediaDetails.INDEX_SIZE: { -- 2.11.0