From bfb309041d8e59f1c238263bfb346729ef74a751 Mon Sep 17 00:00:00 2001 From: Vitaliy Date: Fri, 1 Mar 2019 19:13:22 +0200 Subject: [PATCH] fix possible npe --- .../osmand/plus/activities/ShowRouteInfoDialogFragment.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/activities/ShowRouteInfoDialogFragment.java b/OsmAnd/src/net/osmand/plus/activities/ShowRouteInfoDialogFragment.java index 38d01e2057..ae44fedc68 100644 --- a/OsmAnd/src/net/osmand/plus/activities/ShowRouteInfoDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/activities/ShowRouteInfoDialogFragment.java @@ -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 { } } } -} \ No newline at end of file +}