Ignore:
Timestamp:
2012-12-09T16:07:26+01:00 (12 years ago)
Author:
donvip
Message:

[josm_osminspector] Fix NPE, warnings

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/OsmInspectorPlugin/src/org/openstreetmap/josm/plugins/osminspector/OsmInspectorPlugin.java

    r28935 r29058  
    66import java.awt.event.MouseEvent;
    77import java.awt.event.MouseListener;
    8 import java.util.ArrayList;
    98import java.util.List;
    109
     
    1312import org.openstreetmap.josm.data.Preferences.PreferenceChangeEvent;
    1413import org.openstreetmap.josm.data.Preferences.PreferenceChangedListener;
    15 import org.openstreetmap.josm.data.coor.EastNorth;
    16 import org.openstreetmap.josm.data.coor.LatLon;
    1714import org.openstreetmap.josm.gui.JosmUserIdentityManager;
    1815import org.openstreetmap.josm.gui.MapFrame;
     
    2724import org.openstreetmap.josm.plugins.Plugin;
    2825import org.openstreetmap.josm.plugins.PluginInformation;
    29 import org.openstreetmap.josm.plugins.osminspector.gui.OsmInspectorDialog;
    3026import org.openstreetmap.josm.tools.Shortcut;
    3127
     
    3935
    4036    /** The bounding box from where the MapDust bugs are down-loaded */
    41     private Bounds bBox;
     37    //private Bounds bBox;
    4238
    4339    private OsmInspectorLayer inspectorLayer;
     
    6157        Shortcut shortcut = Shortcut.registerShortcut("OsmInspector", tr("Toggle: {0}", tr("Open OsmInspector")),
    6258                KeyEvent.VK_1, Shortcut.ALT_SHIFT);
    63         String name = "Osm Inspector error reports";
    64         String tooltip = "Activates the Osm Inspector reporter plugin";
     59        //String name = "Osm Inspector error reports";
     60        //String tooltip = "Activates the Osm Inspector reporter plugin";
    6561       
    6662        /* add default values for static variables */
     
    137133        //
    138134        public void mouseClicked(MouseEvent arg0) {
    139                 inspectorLayer.selectFeatures(arg0.getX(), arg0.getY());
     135            if (inspectorLayer != null) {
     136                inspectorLayer.selectFeatures(arg0.getX(), arg0.getY());
     137            }
    140138        }
    141139
Note: See TracChangeset for help on using the changeset viewer.