Index: trunk/src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesDialog.java	(revision 7367)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesDialog.java	(revision 7368)
@@ -139,5 +139,5 @@
      */
     private final JTable tagTable = new JTable(tagData);
-    
+
     /**
      * The membership table.
@@ -257,5 +257,5 @@
             bothTables.add(presets, GBC.eol().fill(GBC.HORIZONTAL).insets(5, 2, 5, 2));
         }
-        
+
         setupBlankSpaceMenu();
         setupKeyboardShortcuts();
@@ -279,5 +279,5 @@
 
         editHelper.loadTagsIfNeeded();
-        
+
         Main.pref.addPreferenceChangeListener(this);
     }
@@ -583,5 +583,5 @@
             tagTable.getCellEditor().cancelCellEditing();
         }
-        
+
         // Ignore parameter as we do not want to operate always on real selection here, especially in draw mode
         Collection<OsmPrimitive> newSel = Main.main.getInProgressSelection();
@@ -1078,7 +1078,8 @@
                 } else if (membershipTable.getSelectedRowCount() == 1) {
                     row = membershipTable.getSelectedRow();
-                    String type = URLEncoder.encode(
-                            ((Relation)membershipData.getValueAt(row, 0)).get("type"), "UTF-8"
-                            );
+                    String type = ((Relation)membershipData.getValueAt(row, 0)).get("type");
+                    if (type != null) {
+                        type = URLEncoder.encode(type, "UTF-8");
+                    }
 
                     if (type != null && !type.isEmpty()) {
@@ -1111,5 +1112,5 @@
                                     if (osize > -1) {
                                         conn.disconnect();
-    
+
                                         conn = Utils.openHttpConnection(new URI(u.toString()
                                                 .replace("=", "%3D") /* do not URLencode whole string! */
