Changeset 12059 in josm for trunk/src/org


Ignore:
Timestamp:
2017-05-04T10:22:09+02:00 (7 years ago)
Author:
stoecker
Message:

fix silent import error for NMEA data

Location:
trunk/src/org/openstreetmap/josm/io
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/io/FileImporter.java

    r11848 r12059  
    1616import org.openstreetmap.josm.gui.progress.ProgressMonitor;
    1717import org.openstreetmap.josm.gui.util.GuiHelper;
     18import org.openstreetmap.josm.tools.bugreport.BugReportExceptionHandler;
    1819import org.openstreetmap.josm.tools.Utils;
    1920
     
    102103            displayError(f, e);
    103104            return false;
     105        } catch (Exception e) {
     106            BugReportExceptionHandler.handleException(e);
     107            return false;
    104108        }
    105109    }
  • trunk/src/org/openstreetmap/josm/io/NmeaReader.java

    r11768 r12059  
    340340                // vdop
    341341                accu = e[GPGSA.VDOP.position];
    342                 if (!accu.isEmpty()) {
     342                if (!accu.isEmpty() && currentwp != null) {
    343343                    currentwp.put(GpxConstants.PT_VDOP, Float.valueOf(accu));
    344344                }
    345345                // hdop
    346346                accu = e[GPGSA.HDOP.position];
    347                 if (!accu.isEmpty()) {
     347                if (!accu.isEmpty() && currentwp != null) {
    348348                    currentwp.put(GpxConstants.PT_HDOP, Float.valueOf(accu));
    349349                }
    350350                // pdop
    351351                accu = e[GPGSA.PDOP.position];
    352                 if (!accu.isEmpty()) {
     352                if (!accu.isEmpty() && currentwp != null) {
    353353                    currentwp.put(GpxConstants.PT_PDOP, Float.valueOf(accu));
    354354                }
Note: See TracChangeset for help on using the changeset viewer.