Changeset 29601 in osm for applications


Ignore:
Timestamp:
2013-05-27T12:09:07+02:00 (12 years ago)
Author:
larry0ua
Message:

PicLayer - #8743 - fixed NPE when removing last layer

Location:
applications/editors/josm/plugins/piclayer
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/piclayer/build.xml

    r29596 r29601  
    11<?xml version="1.0" encoding="utf-8"?>
    22<project name="PicLayer" default="dist" basedir=".">
    3     <property name="commit.message" value="PicLayer - #7127 - added world file loading option"/>
     3    <property name="commit.message" value="PicLayer - #8743 - fixed NPE when removing last layer"/>
    44    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    55    <property name="plugin.main.version" value="5960"/>
  • applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/PicLayerPlugin.java

    r27766 r29601  
    169169                new SavePictureCalibrationAction((PicLayerAbstract) arg0).actionPerformed(null);
    170170        }
    171         boolean enable = Main.map.mapView.getAllLayers().size() != 0;
     171        // Why should I do all these checks now?
     172        boolean enable = Main.map != null && Main.map.mapView != null && Main.map.mapView.getAllLayers() != null && Main.map.mapView.getAllLayers().size() != 0;
    172173        menu.setEnabled(enable);
    173174    }
Note: See TracChangeset for help on using the changeset viewer.