Ignore:
Timestamp:
2016-04-03T16:22:18+02:00 (8 years ago)
Author:
Don-vip
Message:

fix coverity 1353523 + 1347995

File:
1 edited

Legend:

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

    r10043 r10106  
    230230
    231231    private final transient TaggingPresetHandler presetHandler = new TaggingPresetHandler() {
    232         @Override public void updateTags(List<Tag> tags) {
     232        @Override
     233        public void updateTags(List<Tag> tags) {
    233234            Command command = TaggingPreset.createCommand(getSelection(), tags);
    234             if (command != null) Main.main.undoRedo.add(command);
    235         }
    236 
    237         @Override public Collection<OsmPrimitive> getSelection() {
    238             if (Main.main == null) return null;
    239             return Main.main.getInProgressSelection();
     235            if (command != null) {
     236                Main.main.undoRedo.add(command);
     237            }
     238        }
     239
     240        @Override
     241        public Collection<OsmPrimitive> getSelection() {
     242            return Main.main == null ? Collections.<OsmPrimitive>emptyList() : Main.main.getInProgressSelection();
    240243        }
    241244    };
Note: See TracChangeset for help on using the changeset viewer.