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) {
|
||||
text = "";
|
||||
} else {
|
||||
if(!Algorithms.isEmpty(text) && locationProvider.getLastKnownLocation() != null) {
|
||||
Location lastKnownLocation = locationProvider.getLastKnownLocation();
|
||||
if(!Algorithms.isEmpty(text) && lastKnownLocation != null) {
|
||||
double dist =
|
||||
CurrentPositionHelper.getOrthogonalDistance(rt, locationProvider.getLastKnownLocation());
|
||||
CurrentPositionHelper.getOrthogonalDistance(rt, lastKnownLocation);
|
||||
if(dist < 50) {
|
||||
showMarker = true;
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue