diff --git a/OsmAnd/src/net/osmand/plus/routepreparationmenu/WaypointsFragment.java b/OsmAnd/src/net/osmand/plus/routepreparationmenu/WaypointsFragment.java index fc5a5123a0..97e87a8636 100644 --- a/OsmAnd/src/net/osmand/plus/routepreparationmenu/WaypointsFragment.java +++ b/OsmAnd/src/net/osmand/plus/routepreparationmenu/WaypointsFragment.java @@ -587,7 +587,7 @@ public class WaypointsFragment extends BaseOsmAndFragment implements ObservableS } private void deleteSwipeItem(int position) { - if (swipeDismissListener != null) { + if (swipeDismissListener != null && position < listView.getCount()) { swipeDismissListener.delete(position); } }