Changeset 10639 in josm


Ignore:
Timestamp:
2016-07-25T21:23:32+02:00 (5 years ago)
Author:
Don-vip
Message:

fix #13207 - IllegalStateException: cannot open system clipboard

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/datatransfer/OsmTransferHandler.java

    r10604 r10639  
    112112     */
    113113    public boolean isDataAvailable() {
    114         Collection<DataFlavor> available = Arrays.asList(ClipboardUtils.getClipboard().getAvailableDataFlavors());
    115         for (AbstractOsmDataPaster s : SUPPORTED) {
    116             if (s.supports(available)) {
    117                 return true;
     114        try {
     115            Collection<DataFlavor> available = Arrays.asList(ClipboardUtils.getClipboard().getAvailableDataFlavors());
     116            for (AbstractOsmDataPaster s : SUPPORTED) {
     117                if (s.supports(available)) {
     118                    return true;
     119                }
    118120            }
     121        } catch (IllegalStateException e) {
     122            Main.debug(e);
    119123        }
    120124        return false;
Note: See TracChangeset for help on using the changeset viewer.