diff options
| -rw-r--r-- | main/src/cgeo/geocaching/maps/CGeoMap.java | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/main/src/cgeo/geocaching/maps/CGeoMap.java b/main/src/cgeo/geocaching/maps/CGeoMap.java index 6856a63..e48ca70 100644 --- a/main/src/cgeo/geocaching/maps/CGeoMap.java +++ b/main/src/cgeo/geocaching/maps/CGeoMap.java @@ -495,9 +495,11 @@ public class CGeoMap extends AbstractMap implements OnMapDragListener, ViewFacto if (!CollectionUtils.isEmpty(dirtyCaches)) { for (String geocode : dirtyCaches) { cgCache cache = app.loadCache(geocode, LoadFlags.LOAD_WAYPOINTS); - // remove to update the cache - caches.remove(cache); - caches.add(cache); + if (cache != null) { + // remove to update the cache + caches.remove(cache); + caches.add(cache); + } } dirtyCaches.clear(); // Update display |
