Changeset 18927 in josm for trunk/src/org/openstreetmap


Ignore:
Timestamp:
2023-12-27T22:09:21+01:00 (11 months ago)
Author:
taylor.smock
Message:

Fix #23316: MarkerLayer should return an empty list instead of a list with a single null value when the entry is null

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/MarkerLayer.java

    r18613 r18927  
    7676/**
    7777 * A layer holding markers.
    78  *
     78 * <p>
    7979 * Markers are GPS points with a name and, optionally, a symbol code attached;
    8080 * marker layers can be created from waypoints when importing raw GPS data,
    8181 * but they may also come from other sources.
    82  *
     82 * <p>
    8383 * The symbol code is for future use.
    84  *
     84 * <p>
    8585 * The data is read only.
    8686 */
     
    9595    private Marker currentMarker;
    9696    public AudioMarker syncAudioMarker;
    97     private Color color, realcolor;
     97    private Color color;
     98    private Color realcolor;
    9899    final int markerSize = new IntegerProperty("draw.rawgps.markers.size", 4).get();
    99100    final BasicStroke markerStroke = new StrokeProperty("draw.rawgps.markers.stroke", "1").get();
     
    523524    public List<? extends IImageEntry<?>> getSelection() {
    524525        if (this.currentMarker instanceof ImageMarker) {
    525             return Collections.singletonList(((ImageMarker) this.currentMarker).getRemoteEntry());
     526            final RemoteEntry remoteEntry = ((ImageMarker) this.currentMarker).getRemoteEntry();
     527            if (remoteEntry != null) {
     528                return Collections.singletonList(remoteEntry);
     529            }
    526530        }
    527531        return Collections.emptyList();
Note: See TracChangeset for help on using the changeset viewer.