Fix NPE
This commit is contained in:
parent
728c53cc69
commit
11246e3d3d
1 changed files with 3 additions and 2 deletions
|
@ -727,9 +727,10 @@ public class MapInfoWidgetsFactory {
|
||||||
if (text == null) {
|
if (text == null) {
|
||||||
text = "";
|
text = "";
|
||||||
} else {
|
} else {
|
||||||
if(!Algorithms.isEmpty(text) && locationProvider.getLastKnownLocation() != null) {
|
Location lastKnownLocation = locationProvider.getLastKnownLocation();
|
||||||
|
if(!Algorithms.isEmpty(text) && lastKnownLocation != null) {
|
||||||
double dist =
|
double dist =
|
||||||
CurrentPositionHelper.getOrthogonalDistance(rt, locationProvider.getLastKnownLocation());
|
CurrentPositionHelper.getOrthogonalDistance(rt, lastKnownLocation);
|
||||||
if(dist < 50) {
|
if(dist < 50) {
|
||||||
showMarker = true;
|
showMarker = true;
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue