Index: trunk/src/org/openstreetmap/josm/io/NmeaReader.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/NmeaReader.java	(revision 1048)
+++ trunk/src/org/openstreetmap/josm/io/NmeaReader.java	(revision 1049)
@@ -9,4 +9,5 @@
 import java.io.InputStreamReader;
 import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.Collection;
 
@@ -140,4 +141,7 @@
 				// XXX: No need for it: String checksum = nmeaAndChecksum[1];
 				String[] e = nmea.split(",");
+				if (e.length == 0) {
+				    continue;
+				}
 				if (NMEA_TYPE.GPRMC.equals(e[TYPE])) {
 					LatLon latLon = parseLatLon(e);
@@ -157,5 +161,9 @@
 
 	private LatLon parseLatLon(String[] e) throws NumberFormatException {
-		String widthNorth = e[GPRMC.WIDTH_NORTH.position].trim();
+	    // If the array looks bogus don't try to get valuable information from it
+	    if (e.length != 13) {
+	        return null;
+	    }
+        String widthNorth = e[GPRMC.WIDTH_NORTH.position].trim();
 		String lengthEast = e[GPRMC.LENGTH_EAST.position].trim();
 		if ("".equals(widthNorth) || "".equals(lengthEast)) {
