Index: /trunk/src/org/openstreetmap/josm/actions/SelectByInternalPointAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/SelectByInternalPointAction.java	(revision 7920)
+++ /trunk/src/org/openstreetmap/josm/actions/SelectByInternalPointAction.java	(revision 7921)
@@ -5,4 +5,5 @@
 import java.util.ArrayList;
 import java.util.Collection;
+import java.util.Collections;
 import java.util.TreeMap;
 
@@ -10,4 +11,5 @@
 import org.openstreetmap.josm.data.coor.EastNorth;
 import org.openstreetmap.josm.data.osm.BBox;
+import org.openstreetmap.josm.data.osm.DataSet;
 import org.openstreetmap.josm.data.osm.Node;
 import org.openstreetmap.josm.data.osm.OsmPrimitive;
@@ -30,7 +32,11 @@
      */
     public static Collection<OsmPrimitive> getSurroundingObjects(EastNorth internalPoint) {
+        final DataSet ds = getCurrentDataSet();
+        if (ds == null) {
+            return Collections.emptySet();
+        }
         final Node n = new Node(internalPoint);
         final TreeMap<Double, OsmPrimitive> found = new TreeMap<>();
-        for (Way w : getCurrentDataSet().getWays()) {
+        for (Way w : ds.getWays()) {
             if (w.isUsable() && w.isClosed()) {
                 if (Geometry.nodeInsidePolygon(n, w.getNodes())) {
@@ -39,5 +45,5 @@
             }
         }
-        for (Relation r : getCurrentDataSet().getRelations()) {
+        for (Relation r : ds.getRelations()) {
             if (r.isUsable() && r.isMultipolygon()) {
                 if (Geometry.isNodeInsideMultiPolygon(n, r, null)) {
Index: /trunk/src/org/openstreetmap/josm/gui/SelectionManager.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/SelectionManager.java	(revision 7920)
+++ /trunk/src/org/openstreetmap/josm/gui/SelectionManager.java	(revision 7921)
@@ -151,5 +151,5 @@
     @Override
     public void mousePressed(MouseEvent e) {
-        if (e.getButton() == MouseEvent.BUTTON1 && e.getClickCount() > 1) {
+        if (e.getButton() == MouseEvent.BUTTON1 && e.getClickCount() > 1 && Main.main.getCurrentDataSet() != null) {
             SelectByInternalPointAction.performSelection(Main.map.mapView.getEastNorth(e.getX(), e.getY()),
                     (e.getModifiersEx() & MouseEvent.SHIFT_DOWN_MASK) > 0,
