Index: src/org/openstreetmap/josm/io/NmeaReader.java
===================================================================
--- src/org/openstreetmap/josm/io/NmeaReader.java	(revision 849)
+++ src/org/openstreetmap/josm/io/NmeaReader.java	(working copy)
@@ -139,18 +139,38 @@
 
 		try {
 			rd = new BufferedReader(new InputStreamReader(source));
+
+			// Used to store an exception that was thrown in the previous loop.
+			// We want to ignore errors in the last line in the file. 
+			// If we come around the loop again (i.e. the file contains 
+			//  another line), then throw the stored exception.
+			RuntimeException re = null;
+
 			while ((nmeaWithChecksum = rd.readLine()) != null) {
-				String[] nmeaAndChecksum = nmeaWithChecksum.split("\\*");
-				String nmea = nmeaAndChecksum[0];
-				// XXX: No need for it: String checksum = nmeaAndChecksum[1];
-				String[] e = nmea.split(",");
-				if (NMEA_TYPE.GPRMC.equals(e[TYPE])) {
-					LatLon latLon = parseLatLon(e);
-					if (latLon == null) {
-						continue;
+				try {
+					if (re != null)
+						throw re;
+					String[] nmeaAndChecksum = nmeaWithChecksum.split("\\*");
+					String nmea = nmeaAndChecksum[0];
+					// XXX: No need for it: String checksum = nmeaAndChecksum[1];
+					String[] e = nmea.split(",");
+					if (NMEA_TYPE.GPRMC.equals(e[TYPE])) {
+						LatLon latLon = parseLatLon(e);
+						if (latLon == null) {
+							continue;
+						}
+						WayPoint currentWayPoint = new WayPoint(latLon);
+						currentTrackSeg.add(currentWayPoint);
 					}
-					WayPoint currentWayPoint = new WayPoint(latLon);
-					currentTrackSeg.add(currentWayPoint);
+				} catch (final RuntimeException e) {
+					// Store the exception.
+					if (re == null) {
+						re = e;
+					} else {
+						// If we already have an exception stored (can't happen),
+						//  throw it, instead of overwriting it.
+						throw re;
+					}
 				}
 			}
 			rd.close();
