Index: /trunk/src/org/openstreetmap/josm/actions/CombineWayAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/CombineWayAction.java	(revision 1620)
+++ /trunk/src/org/openstreetmap/josm/actions/CombineWayAction.java	(revision 1621)
@@ -88,5 +88,5 @@
                     for(Way w : selectedWays) {
                         if (rm.member == w) {
-                            Pair<Relation,String> pair = new Pair<Relation,String>(r, rm.role);
+                            Pair<Relation,String> pair = new Pair<Relation,String>(r, rm.role == null ? "" : rm.role);
                             HashSet<Way> waylinks = new HashSet<Way>();
                             if (backlinks.containsKey(pair)) {
@@ -109,12 +109,12 @@
         for (HashSet<Way> waylinks : backlinks.values()) {
             if (!waylinks.containsAll(selectedWays)) {
-                int option = new ExtendedDialog(Main.parent, 
-                        tr("Combine ways with different memberships?"), 
+                int option = new ExtendedDialog(Main.parent,
+                        tr("Combine ways with different memberships?"),
                         tr("The selected ways have differing relation memberships.  "
                             + "Do you still want to combine them?"),
-                        new String[] {tr("Combine Anyway"), tr("Cancel")}, 
-                        new String[] {"combineway.png", "cancel.png"}).getValue();  
+                        new String[] {tr("Combine Anyway"), tr("Cancel")},
+                        new String[] {"combineway.png", "cancel.png"}).getValue();
                 if (option == 1) break;
-                
+
                 return;
             }
@@ -138,10 +138,10 @@
             Object secondTry = actuallyCombineWays(selectedWays, true);
             if (secondTry instanceof List) {
-                int option = new ExtendedDialog(Main.parent, 
-                    tr("Change directions?"), 
+                int option = new ExtendedDialog(Main.parent,
+                    tr("Change directions?"),
                     tr("The ways can not be combined in their current directions.  "
                         + "Do you want to reverse some of them?"),
-                    new String[] {tr("Reverse and Combine"), tr("Cancel")}, 
-                    new String[] {"wayflip.png", "cancel.png"}).getValue(); 
+                    new String[] {tr("Reverse and Combine"), tr("Cancel")},
+                    new String[] {"wayflip.png", "cancel.png"}).getValue();
                 if (option != 1) return;
                 nodeList = (List<Node>) secondTry;
@@ -187,11 +187,11 @@
 
         if (!components.isEmpty()) {
-            int answer = new ExtendedDialog(Main.parent, 
-                tr("Enter values for all conflicts."), 
+            int answer = new ExtendedDialog(Main.parent,
+                tr("Enter values for all conflicts."),
                 p,
-                new String[] {tr("Solve Conflicts"), tr("Cancel")}, 
-                new String[] {"dialogs/conflict.png", "cancel.png"}).getValue();  
+                new String[] {tr("Solve Conflicts"), tr("Cancel")},
+                new String[] {"dialogs/conflict.png", "cancel.png"}).getValue();
             if (answer != 1) return;
-            
+
             for (Entry<String, JComboBox> e : components.entrySet())
                 newWay.put(e.getKey(), e.getValue().getEditor().getItem().toString());
