aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authorrsudev <rasch@munin-soft.de>2014-01-23 16:07:36 +0100
committerrsudev <rasch@munin-soft.de>2014-01-23 16:07:36 +0100
commit536bdbb726986282dba14f0924f11eddfd32ecab (patch)
tree44cb00fc686a96fd7d790671aa798d99c1e60094 /main
parent4b55eaec9ce615597e7b21dee48a3c9bad66c0a1 (diff)
downloadcgeo-536bdbb726986282dba14f0924f11eddfd32ecab.zip
cgeo-536bdbb726986282dba14f0924f11eddfd32ecab.tar.gz
cgeo-536bdbb726986282dba14f0924f11eddfd32ecab.tar.bz2
Corrections for null analysis
Diffstat (limited to 'main')
-rw-r--r--main/src/cgeo/geocaching/export/GpxSerializer.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/main/src/cgeo/geocaching/export/GpxSerializer.java b/main/src/cgeo/geocaching/export/GpxSerializer.java
index 2afed44..df07f17 100644
--- a/main/src/cgeo/geocaching/export/GpxSerializer.java
+++ b/main/src/cgeo/geocaching/export/GpxSerializer.java
@@ -90,7 +90,10 @@ public final class GpxSerializer {
private void exportBatch(final XmlSerializer gpx, Collection<String> geocodesOfBatch) throws IOException {
final Set<Geocache> caches = DataStore.loadCaches(geocodesOfBatch, LoadFlags.LOAD_ALL_DB_ONLY);
for (final Geocache cache : caches) {
- final Geopoint coords = cache != null ? cache.getCoords() : null;
+ if (cache == null) {
+ continue;
+ }
+ final Geopoint coords = cache.getCoords();
if (coords == null) {
// Export would be invalid without coordinates.
continue;