Changeset 2506 in josm for trunk/src/org


Ignore:
Timestamp:
2009-11-22T20:23:13+01:00 (15 years ago)
Author:
Gubaer
Message:

fixed NPE

File:
1 edited

Legend:

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

    r2504 r2506  
    525525            List<Relation> sel =  getSelectedRelations();
    526526            this.relations.clear();
     527            if (relations == null) {
     528                selectionModel.clearSelection();
     529                fireContentsChanged(this,0,getSize());
     530                return;
     531
     532            }
    527533            for (Relation r: relations) {
    528534                if (! r.isDeleted() && r.isVisible() && !r.incomplete) {
     
    657663        public synchronized void setSelectedRelations(List<Relation> sel) {
    658664            selectionModel.clearSelection();
    659             if (sel == null || sel.isEmpty() || relations == null)
     665            if (sel == null || sel.isEmpty())
    660666                return;
    661667            for (Relation r: sel) {
Note: See TracChangeset for help on using the changeset viewer.