diff --git a/OsmAnd/src/net/osmand/plus/activities/search/GeoIntentActivity.java b/OsmAnd/src/net/osmand/plus/activities/search/GeoIntentActivity.java index f99a4079e7..b422525623 100644 --- a/OsmAnd/src/net/osmand/plus/activities/search/GeoIntentActivity.java +++ b/OsmAnd/src/net/osmand/plus/activities/search/GeoIntentActivity.java @@ -200,10 +200,14 @@ public class GeoIntentActivity extends OsmandListActivity { */ private MyService extract(Uri data) { if ("http".equalsIgnoreCase(data.getScheme()) && "maps.google.com".equals(data.getHost())) { - String q = data.getQueryParameter("q").split(" ")[0]; - if (q.indexOf(',') == -1) { - q = data.getQueryParameter("daddr").split(" ")[0]; - } + String q = null; + String parameter = data.getQueryParameter("q"); + if (parameter == null) { + parameter = data.getQueryParameter("daddr"); + } + if(parameter != null) { + q = parameter.split(" ")[0]; + } if (q.indexOf(',') != -1) { int i = q.indexOf(','); String lat = q.substring(0, i);