Fix NPE
This commit is contained in:
parent
e62a249f91
commit
483d7d8e6f
1 changed files with 3 additions and 0 deletions
|
@ -10,6 +10,7 @@ import java.util.List;
|
|||
import net.osmand.ResultMatcher;
|
||||
import net.osmand.access.AccessibleToast;
|
||||
import net.osmand.data.Amenity;
|
||||
import net.osmand.data.AmenityType;
|
||||
import net.osmand.data.City;
|
||||
import net.osmand.data.MapObject;
|
||||
import net.osmand.data.Street;
|
||||
|
@ -336,6 +337,8 @@ public class GeoIntentActivity extends OsmandListActivity {
|
|||
public GeoPointSearch(double lat , double lon ) {
|
||||
// TODO zoom is omited for now
|
||||
point = new Amenity();
|
||||
((Amenity)point).setType(AmenityType.USER_DEFINED);
|
||||
((Amenity)point).setSubType("");
|
||||
point.setLocation(lat, lon);
|
||||
point.setName("Lat: " + lat + ",Lon:" + lon);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue