Changeset 29668 in osm for applications/editors/josm


Ignore:
Timestamp:
2013-06-18T23:44:24+02:00 (12 years ago)
Author:
pieren
Message:

trac #5654 Handle an NPE (reason not identified, not able to reproduce)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/MenuActionGrabPlanImage.java

    r29525 r29668  
    371371     */
    372372    private void affineTransform(EastNorth org1, EastNorth org2, EastNorth dst1, EastNorth dst2) {
     373        // handle an NPE case I'm not able to reproduce
     374        if(org1==null || org2==null || dst1==null || dst2==null)
     375        {
     376            JOptionPane.showMessageDialog(Main.parent,
     377                    tr("Ooops. I failed to catch all coordinates\n"+
     378                       "correctly. Retry please."));
     379            System.out.println("failed to transform: one coordinate missing:"
     380                       +"org1="+org1+", org2="+org2+", dst1="+dst1+", dst2="+dst2);
     381            return;
     382        }
    373383        double angle = dst1.heading(dst2) - org1.heading(org2);
    374384        double proportion = dst1.distance(dst2)/org1.distance(org2);
Note: See TracChangeset for help on using the changeset viewer.