kb0 / dart-gpx

Dart package for load, manipulate, and save GPS data in GPX format (a light-weight XML data format for the interchange of GPS data - waypoints, routes, and tracks).
Apache License 2.0
24 stars 27 forks source link

fix no-element exception when href is absent #25

Closed arthurbcd closed 8 months ago

arthurbcd commented 8 months ago

Description:

Issue: Currently, the GPX reader crashes when it encounters a GPX link () element without an href attribute.

Proposed Solution: This PR introduces a safeguard against such scenarios. Instead of crashing, the reader will now handle missing href attributes gracefully.

Implementation Details:

Added a check for the presence of the href attribute in a GPX link.

Benefit: This change enhances the robustness of the GPX reader, allowing it to process GPX files with missing href attributes in links without failing.