Index: /applications/editors/josm/plugins/openvisible/src/at/dallermassl/josm/plugin/openvisible/OpenVisibleAction.java
===================================================================
--- /applications/editors/josm/plugins/openvisible/src/at/dallermassl/josm/plugin/openvisible/OpenVisibleAction.java	(revision 20066)
+++ /applications/editors/josm/plugins/openvisible/src/at/dallermassl/josm/plugin/openvisible/OpenVisibleAction.java	(revision 20067)
@@ -124,4 +124,9 @@
                 r = new GpxReader(new FileInputStream(file));
             }
+            if (!r.parse(true)) {
+                // input was not properly parsed, abort
+                JOptionPane.showMessageDialog(Main.parent, tr("Parsing file \"{0}\" failed", file));
+                throw new IllegalStateException();
+            }				
             r.data.storageFile = file;
             GpxLayer gpxLayer = new GpxLayer(r.data, fn);
