fix possible npe

This commit is contained in:
Vitaliy 2019-03-01 19:13:22 +02:00 committed by GitHub
parent 241233315c
commit bfb309041d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1063,7 +1063,8 @@ public class ShowRouteInfoDialogFragment extends BaseOsmAndFragment {
GeocodingLookupService.AddressLookupRequest addressLookupRequest = new GeocodingLookupService.AddressLookupRequest(latLon, new GeocodingLookupService.OnAddressLookupResult() {
@Override
public void geocodingDone(String address) {
if (!TextUtils.isEmpty(address) && !address.equals(currentAddress)) {
if (!TextUtils.isEmpty(address) && !address.equals(currentAddress)
&& locationTv != null && container != null) {
locationTv.setText(address);
container.setMinimumHeight(dpToPx(80));
}
@ -2196,4 +2197,4 @@ public class ShowRouteInfoDialogFragment extends BaseOsmAndFragment {
}
}
}
}
}