Changeset 6762 in josm


Ignore:
Timestamp:
2014-01-27T03:20:43+01:00 (11 years ago)
Author:
Don-vip
Message:

fix NPEs seen in tagchecker tests

Location:
trunk/src/org/openstreetmap/josm
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/validation/tests/MapCSSTagChecker.java

    r6720 r6762  
    308308        String getMessage(OsmPrimitive p) {
    309309            if (errors.isEmpty()) {
    310                 return null;
     310                // Return something to avoid NPEs
     311                return rule.declaration.toString();
    311312            } else {
    312313                final Object val = errors.keySet().iterator().next().val;
  • trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/Selector.java

    r6748 r6762  
    230230            if (ChildOrParentSelectorType.ELEMENT_OF.equals(type)) {
    231231
    232                 if (e.osm instanceof Node) {
     232                if (e.osm instanceof Node || e.osm.getDataSet() == null) {
    233233                    // nodes cannot contain elements
    234234                    return false;
Note: See TracChangeset for help on using the changeset viewer.