Index: trunk/src/org/openstreetmap/josm/io/GpxParser.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/GpxParser.java	(revision 18818)
+++ trunk/src/org/openstreetmap/josm/io/GpxParser.java	(revision 18819)
@@ -638,4 +638,7 @@
                 currentState = states.pop();
                 convertUrlToLink(currentWayPoint.attr);
+                if (!currentWayPoint.isLatLonKnown()) {
+                    throw new SAXException(tr("{0} element does not have valid latitude and/or longitude.", localName));
+                }
                 currentRoute.routePoints.add(currentWayPoint);
                 break;
@@ -643,4 +646,7 @@
                 currentState = states.pop();
                 convertUrlToLink(currentWayPoint.attr);
+                if (!currentWayPoint.isLatLonKnown()) {
+                    throw new SAXException(tr("{0} element does not have valid latitude and/or longitude.", localName));
+                }
                 currentTrackSeg.add(currentWayPoint);
                 break;
@@ -649,4 +655,8 @@
                 convertUrlToLink(currentWayPoint.attr);
                 currentWayPoint.getExtensions().addAll(currentExtensionCollection);
+                if (!currentWayPoint.isLatLonKnown()) {
+                    currentExtensionCollection.clear();
+                    throw new SAXException(tr("{0} element does not have valid latitude and/or longitude.", localName));
+                }
                 data.waypoints.add(currentWayPoint);
                 currentExtensionCollection.clear();
