Index: /trunk/src/org/openstreetmap/josm/data/gpx/GpxData.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/gpx/GpxData.java	(revision 14852)
+++ /trunk/src/org/openstreetmap/josm/data/gpx/GpxData.java	(revision 14853)
@@ -426,5 +426,8 @@
 
         // do not let the name grow if split / combine operations are called iteratively
-        attrs.put("name", attrs.get("name").toString().replaceFirst(" #\\d+$", ""));
+        Object name = attrs.get("name");
+        if (name != null) {
+            attrs.put("name", name.toString().replaceFirst(" #\\d+$", ""));
+        }
 
         clearTracks();
