Index: src/org/openstreetmap/josm/gui/dialogs/relation/RelationEditor.java
===================================================================
--- src/org/openstreetmap/josm/gui/dialogs/relation/RelationEditor.java	(Revision 1864)
+++ src/org/openstreetmap/josm/gui/dialogs/relation/RelationEditor.java	(Arbeitskopie)
@@ -65,6 +65,9 @@
      * @return an instance of RelationEditor suitable for editing that kind of relation
      */
     public static RelationEditor getEditor(OsmDataLayer layer, Relation r, Collection<RelationMember> selectedMembers) {
+        if (layer == null) {
+            throw new NullPointerException("layer is null");
+        }
         for (Class<RelationEditor> e : editors) {
             try {
                 Method m = e.getMethod("canEdit", Relation.class);
