From 483d7d8e6ff93b7901f3988ef5541094b7a48a64 Mon Sep 17 00:00:00 2001 From: Victor Shcherb Date: Sat, 2 Mar 2013 00:14:06 +0100 Subject: [PATCH] Fix NPE --- .../net/osmand/plus/activities/search/GeoIntentActivity.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/OsmAnd/src/net/osmand/plus/activities/search/GeoIntentActivity.java b/OsmAnd/src/net/osmand/plus/activities/search/GeoIntentActivity.java index b1a0aa9b24..1708aae187 100644 --- a/OsmAnd/src/net/osmand/plus/activities/search/GeoIntentActivity.java +++ b/OsmAnd/src/net/osmand/plus/activities/search/GeoIntentActivity.java @@ -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); }