Ticket #18764: 18764.patch

File 18764.patch, 934 bytes (added by taylor.smock, 4 years ago)

Add check to avoid NPE

  • src/org/openstreetmap/josm/gui/mappaint/mapcss/Selector.java

     
    439439                if (right instanceof OptimizedGeneralSelector
    440440                        && ((OptimizedGeneralSelector) right).matchesBase(OsmPrimitiveType.WAY)) {
    441441                    final CrossingFinder crossingFinder = new CrossingFinder(e);
    442                     crossingFinder.visit(e.osm.getDataSet().searchWays(e.osm.getBBox()));
     442                    if (e.osm.getDataSet() != null)
     443                        crossingFinder.visit(e.osm.getDataSet().searchWays(e.osm.getBBox()));
    443444                }
    444445                return e.children != null;
    445446            } else if (ChildOrParentSelectorType.SIBLING == type) {