diff options
| author | koem <koem@petoria.de> | 2013-02-13 01:07:35 +1300 |
|---|---|---|
| committer | koem <koem@petoria.de> | 2013-02-13 01:07:35 +1300 |
| commit | be8da094a918f63a977f9a0ee31e2cddee5af58d (patch) | |
| tree | 734620dd334735bfe23d8a3a9cea166b6631f440 /main/src/cgeo/geocaching/export/GpxExport.java | |
| parent | 6d450d980283b81e09fa774651c27ac77d229eb8 (diff) | |
| parent | 7b4a0b337a5f22bf0058c22967da94faea9ce318 (diff) | |
| download | cgeo-be8da094a918f63a977f9a0ee31e2cddee5af58d.zip cgeo-be8da094a918f63a977f9a0ee31e2cddee5af58d.tar.gz cgeo-be8da094a918f63a977f9a0ee31e2cddee5af58d.tar.bz2 | |
Merge branch 'master' into chooselist
Diffstat (limited to 'main/src/cgeo/geocaching/export/GpxExport.java')
| -rw-r--r-- | main/src/cgeo/geocaching/export/GpxExport.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/main/src/cgeo/geocaching/export/GpxExport.java b/main/src/cgeo/geocaching/export/GpxExport.java index 4997923..d130e1f 100644 --- a/main/src/cgeo/geocaching/export/GpxExport.java +++ b/main/src/cgeo/geocaching/export/GpxExport.java @@ -322,11 +322,14 @@ class GpxExport extends AbstractExport { gpx.startTag(PREFIX_GROUNDSPEAK, "attributes"); for (String attribute : cache.getAttributes()) { - final CacheAttribute attr = CacheAttribute.getByGcRawName(CacheAttribute.trimAttributeName(attribute)); + final CacheAttribute attr = CacheAttribute.getByRawName(CacheAttribute.trimAttributeName(attribute)); + if (attr == null) { + continue; + } final boolean enabled = CacheAttribute.isEnabled(attribute); gpx.startTag(PREFIX_GROUNDSPEAK, "attribute"); - gpx.attribute("", "id", Integer.toString(attr.id)); + gpx.attribute("", "id", Integer.toString(attr.gcid)); gpx.attribute("", "inc", enabled ? "1" : "0"); gpx.text(attr.getL10n(enabled)); gpx.endTag(PREFIX_GROUNDSPEAK, "attribute"); |
