Ignore:
Timestamp:
2009-07-28T20:01:00+02:00 (16 years ago)
Author:
Gubaer
Message:

fixed #3116: NullPointerException when creating a relation without the data layer selected

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/dialogs/relation/RelationEditor.java

    r1857 r1866  
    8989    }
    9090
    91     protected RelationEditor(OsmDataLayer layer, Relation relation, Collection<RelationMember> selectedMembers) {
     91    /**
     92     * Creates a new relation editor
     93     *
     94     * @param layer  the {@see OsmDataLayer} in whose context a relation is edited. Must not be null.
     95     * @param relation the relation. Can be null if a new relation is to be edited.
     96     * @param selectedMembers  a collection of members in <code>relation</code> which the editor
     97     * should display selected when the editor is first displayed on screen
     98     * @throws IllegalArgumentException thrown if layer is null
     99     */
     100    protected RelationEditor(OsmDataLayer layer, Relation relation, Collection<RelationMember> selectedMembers)  throws IllegalArgumentException{
    92101        // Initalizes ExtendedDialog
    93102        super(Main.parent,
     
    96105                false
    97106        );
     107        if (layer == null)
     108            throw new IllegalArgumentException(tr("parameter ''layer'' must not be null", "layer"));
    98109        this.layer = layer;
    99110        setRelation(relation);
Note: See TracChangeset for help on using the changeset viewer.