Changeset 2509 in josm


Ignore:
Timestamp:
2009-11-23T11:31:33+01:00 (14 years ago)
Author:
stoecker
Message:

fixed NPE - closes #3989

Location:
trunk/src/org/openstreetmap/josm/data/projection
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/projection/LambertCC9Zones.java

    r2507 r2509  
    199199            return null;
    200200        layoutZone = ((JComboBox)prefcb).getSelectedIndex();
    201         if (layoutZone == 0) {
    202             layoutZone = layoutZone +1 -1;
    203         }
    204201        return Collections.singleton(Integer.toString(layoutZone+1));
    205202    }
     
    220217            } catch(NumberFormatException e) {}
    221218        }
    222         if (layoutZone == 0) {
    223             layoutZone = layoutZone +1 -1;
    224         }
    225219    }
    226220
  • trunk/src/org/openstreetmap/josm/data/projection/UTM.java

    r2499 r2509  
    403403    {
    404404        zone = DEFAULT_ZONE;
    405         try {
    406             for(String s : args)
    407             {
    408                 zone = Integer.parseInt(s);
    409                 if(zone <= 0 || zone > 60)
    410                     zone = DEFAULT_ZONE;
    411                 break;
    412             }
    413         } catch(NumberFormatException e) {}
     405        if(args != null)
     406        {
     407            try {
     408                for(String s : args)
     409                {
     410                    zone = Integer.parseInt(s);
     411                    if(zone <= 0 || zone > 60)
     412                        zone = DEFAULT_ZONE;
     413                    break;
     414                }
     415            } catch(NumberFormatException e) {}
     416        }
    414417    }
    415418
Note: See TracChangeset for help on using the changeset viewer.