Changeset 35693 in osm for applications


Ignore:
Timestamp:
2021-02-01T10:33:15+01:00 (3 years ago)
Author:
malcolmh
Message:

catch null pointer

Location:
applications/editors/josm/plugins/seachart/src/render
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/seachart/src/render/Rules.java

    r35685 r35693  
    183183                else
    184184                        return null;
    185                 if ((item = atts.get(att)) == null)
     185                if ((atts == null) || ((item = atts.get(att)) == null))
    186186                        return null;
    187187                else
     
    703703
    704704        private static void cables() {
    705                 if ((Renderer.zoom >= 16) && (feature.geom.length < 2)) {
     705                if ((Renderer.zoom >= 16) && (feature.geom.length < 20)) {
    706706                        if (feature.type == Obj.CBLSUB) {
    707707                                Renderer.lineSymbols(Areas.Cable, 0.0, null, null, 0, Symbols.Mline);
     
    13001300
    13011301        private static void pipelines() {
    1302                 if ((Renderer.zoom >= 16) && (feature.geom.length < 2)) {
     1302                if ((Renderer.zoom >= 16) && (feature.geom.length < 20)) {
    13031303                        if (feature.type == Obj.PIPSOL) {
    13041304                                switch ((CatPIP) getAttEnum(feature.type, Att.CATPIP)) {
  • applications/editors/josm/plugins/seachart/src/render/Signals.java

    r35687 r35693  
    617617                                }
    618618                        } else {
    619                                 if ((Renderer.zoom >= 15) && (lights.get(0) != null)) {
    620                                         AttMap atts = lights.get(0);
     619                                AttMap atts = lights.get(0);
     620                                if ((Renderer.zoom >= 15) && (atts != null)) {
    621621                                        ArrayList<CatLIT> cats = new ArrayList<>();
    622622                                        if (atts.containsKey(Att.CATLIT)) {
Note: See TracChangeset for help on using the changeset viewer.