Changeset 11354 in josm


Ignore:
Timestamp:
2016-12-02T23:39:45+01:00 (8 years ago)
Author:
Don-vip
Message:

fix #14078 - NPE

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/conflict/tags/RelationMemberConflictResolver.java

    r10413 r11354  
    3333import org.openstreetmap.josm.data.osm.OsmPrimitive;
    3434import org.openstreetmap.josm.data.osm.Tag;
     35import org.openstreetmap.josm.gui.layer.OsmDataLayer;
    3536import org.openstreetmap.josm.gui.tagging.ac.AutoCompletingTextField;
    3637import org.openstreetmap.josm.gui.tagging.ac.AutoCompletionList;
     
    196197    public void prepareForEditing() {
    197198        AutoCompletionList acList = new AutoCompletionList();
    198         Main.getLayerManager().getEditLayer().data.getAutoCompletionManager().populateWithMemberRoles(acList);
     199        OsmDataLayer editLayer = Main.getLayerManager().getEditLayer();
     200        if (editLayer != null) {
     201            editLayer.data.getAutoCompletionManager().populateWithMemberRoles(acList);
     202        }
    199203        tfRole.setAutoCompletionList(acList);
    200204        AutoCompletingTextField editor = (AutoCompletingTextField) tblResolver.getColumnModel().getColumn(2).getCellEditor();
     
    203207        }
    204208        AutoCompletionList acList2 = new AutoCompletionList();
    205         Main.getLayerManager().getEditLayer().data.getAutoCompletionManager().populateWithKeys(acList2);
     209        if (editLayer != null) {
     210            editLayer.data.getAutoCompletionManager().populateWithKeys(acList2);
     211        }
    206212        tfKey.setAutoCompletionList(acList2);
    207213    }
Note: See TracChangeset for help on using the changeset viewer.