forked from upstream-mirrors/OpenTracks
fix #537 ignore waypoint markers with invalid
coordinates on import. I've also added a unit test with such an export file.
This commit is contained in:
+2
-1
@@ -301,7 +301,8 @@ abstract class AbstractFileTrackImporter extends DefaultHandler implements Track
|
||||
TrackPoint trackPoint = createTrackPoint();
|
||||
|
||||
if (!LocationUtils.isValidLocation(trackPoint.getLocation())) {
|
||||
throw new SAXException(createErrorMessage("Invalid location detected: " + trackPoint));
|
||||
Log.w(TAG, "Marker with invalid coordinates ignored: " + trackPoint.getLocation());
|
||||
return;
|
||||
}
|
||||
Marker marker = new Marker(trackPoint.getLocation());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user