Fix chart crash
This commit is contained in:
parent
b1379d25a3
commit
d05e6bcdee
1 changed files with 1 additions and 2 deletions
|
@ -27,7 +27,6 @@ import net.osmand.plus.R;
|
|||
import net.osmand.plus.activities.MapActivity;
|
||||
import net.osmand.plus.activities.SettingsNavigationActivity;
|
||||
import net.osmand.plus.helpers.GpxUiHelper;
|
||||
import net.osmand.router.RouteStatistics;
|
||||
import net.osmand.router.RouteStatistics.Boundaries;
|
||||
import net.osmand.router.RouteStatistics.RouteSegmentAttribute;
|
||||
import net.osmand.router.RouteStatistics.Statistics;
|
||||
|
@ -83,7 +82,7 @@ public class RouteInfoCard extends BaseCard {
|
|||
public void onValueSelected(Entry e, Highlight h) {
|
||||
List<RouteSegmentAttribute<E>> elems = routeStatistics.getElements();
|
||||
int i = h.getStackIndex();
|
||||
if (elems.size() > i) {
|
||||
if (i >= 0 && elems.size() > i) {
|
||||
selectedPropertyName = elems.get(i).getPropertyName();
|
||||
if (showLegend) {
|
||||
updateLegend(routeStatistics);
|
||||
|
|
Loading…
Reference in a new issue