Ignore:
Timestamp:
2010-02-18T21:47:44+01:00 (14 years ago)
Author:
matt_gnu
Message:

fix NullPointerExeption when opening a GPX-file in openvisible:

GpxReader.data is only initialized after .parse(), so call parse()
before accessing GpxReader.data

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/openvisible/src/at/dallermassl/josm/plugin/openvisible/OpenVisibleAction.java

    r19352 r20067  
    124124                r = new GpxReader(new FileInputStream(file));
    125125            }
     126            if (!r.parse(true)) {
     127                // input was not properly parsed, abort
     128                JOptionPane.showMessageDialog(Main.parent, tr("Parsing file \"{0}\" failed", file));
     129                throw new IllegalStateException();
     130            }                           
    126131            r.data.storageFile = file;
    127132            GpxLayer gpxLayer = new GpxLayer(r.data, fn);
Note: See TracChangeset for help on using the changeset viewer.