Ticket #6131: select-drag-npe.patch

File select-drag-npe.patch, 638 bytes (added by Zverikk, 12 years ago)

better fix (lastMousePos == null)

  • openstreetmap/josm/actions/mapmode/SelectAction.java

     
    162162            startingDraggingPos = new Point(e.getX(), e.getY());
    163163        }
    164164
     165        if( lastMousePos == null ) {
     166            lastMousePos = e.getPoint();
     167            return;
     168        }
     169
    165170        if (!initialMoveThresholdExceeded) {
    166171            int dxp = lastMousePos.x - e.getX();
    167172            int dyp = lastMousePos.y - e.getY();