Ignore:
Timestamp:
2015-06-07T15:46:39+02:00 (4 years ago)
Author:
Don-vip
Message:

fix #11219 - Open notes in browser with Ctrl-Shift-I: "Advanced info (web)"

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/history/VersionTable.java

    r8419 r8475  
    162162        @Override
    163163        protected String createInfoUrl(Object infoObject) {
    164             HistoryOsmPrimitive primitive = (HistoryOsmPrimitive) infoObject;
    165             return Main.getBaseBrowseUrl() + "/changeset/" + primitive.getChangesetId();
     164            if (infoObject instanceof HistoryOsmPrimitive) {
     165                HistoryOsmPrimitive prim = (HistoryOsmPrimitive) infoObject;
     166                return Main.getBaseBrowseUrl() + "/changeset/" + prim.getChangesetId();
     167            } else {
     168                return null;
     169            }
    166170        }
    167171
     
    195199        @Override
    196200        protected String createInfoUrl(Object infoObject) {
    197             HistoryOsmPrimitive hp = (HistoryOsmPrimitive) infoObject;
    198             return hp.getUser() == null ? null : Main.getBaseUserUrl() + "/" + hp.getUser().getName();
     201            if (infoObject instanceof HistoryOsmPrimitive) {
     202                HistoryOsmPrimitive hp = (HistoryOsmPrimitive) infoObject;
     203                return hp.getUser() == null ? null : Main.getBaseUserUrl() + "/" + hp.getUser().getName();
     204            } else {
     205                return null;
     206            }
    199207        }
    200208
Note: See TracChangeset for help on using the changeset viewer.