Fix "Crash when add waypoint to current recording gpx track"

This commit is contained in:
nazar-kutz 2021-03-09 18:13:37 +02:00
parent 2907d49102
commit 6c6230f55c

View file

@ -737,7 +737,9 @@ public class GpxSelectionHelper {
String rootGpxDir = app.getAppPath(IndexConstants.GPX_INDEX_DIR).getAbsolutePath() + '/';
String fileName = path.replace(rootGpxDir, "");
GPXInfo gpxInfo = GpxUiHelper.getGpxInfoByFileName(app, fileName);
SearchHistoryHelper.getInstance(app).addNewItemToHistory(gpxInfo);
if (gpxInfo != null) {
SearchHistoryHelper.getInstance(app).addNewItemToHistory(gpxInfo);
}
}
return sf;
}