aboutsummaryrefslogtreecommitdiffstats
path: root/main/src/cgeo/geocaching/CacheMenuHandler.java
diff options
context:
space:
mode:
Diffstat (limited to 'main/src/cgeo/geocaching/CacheMenuHandler.java')
-rw-r--r--main/src/cgeo/geocaching/CacheMenuHandler.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/main/src/cgeo/geocaching/CacheMenuHandler.java b/main/src/cgeo/geocaching/CacheMenuHandler.java
index ab11765..cfe9eeb 100644
--- a/main/src/cgeo/geocaching/CacheMenuHandler.java
+++ b/main/src/cgeo/geocaching/CacheMenuHandler.java
@@ -56,6 +56,10 @@ public class CacheMenuHandler extends AbstractUIFactory {
}
public static void onPrepareOptionsMenu(final Menu menu, final Geocache cache) {
+ //
+ if (cache == null) {
+ return;
+ }
final boolean hasCoords = cache.getCoords() != null;
menu.findItem(R.id.menu_default_navigation).setVisible(hasCoords);
menu.findItem(R.id.menu_navigate).setVisible(hasCoords);