Changeset 5789 in josm for trunk/src/org


Ignore:
Timestamp:
2013-03-21T00:50:36+01:00 (12 years ago)
Author:
Don-vip
Message:

fix #8529 - NPE at PropertiesDialog$PasteValueAction.actionPerform

File:
1 edited

Legend:

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

    r5773 r5789  
    11451145            String key = propertyData.getValueAt(propertyTable.getSelectedRow(), 0).toString();
    11461146            Collection<OsmPrimitive> sel = Main.main.getCurrentDataSet().getSelected();
    1147             String value = Utils.getClipboardContent().trim();
    1148             if (sel.isEmpty())
     1147            String clipboard = Utils.getClipboardContent();
     1148            if (sel.isEmpty() || clipboard == null)
    11491149                return;
    1150             Main.main.undoRedo.add(new ChangePropertyCommand(sel, key, value));
     1150            Main.main.undoRedo.add(new ChangePropertyCommand(sel, key, Utils.strip(clipboard)));
    11511151        }
    11521152    }
Note: See TracChangeset for help on using the changeset viewer.