From bab445096e920b16f496eec87bdb656fa740ea71 Mon Sep 17 00:00:00 2001 From: SammysHP Date: Sat, 20 Aug 2011 14:41:37 +0200 Subject: Fix NullPointerException in cgeodetail if cache is opened from URL only with guid. --- src/cgeo/geocaching/cgeodetail.java | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/cgeo/geocaching/cgeodetail.java b/src/cgeo/geocaching/cgeodetail.java index b6f4cd4..89dea60 100644 --- a/src/cgeo/geocaching/cgeodetail.java +++ b/src/cgeo/geocaching/cgeodetail.java @@ -595,9 +595,17 @@ public class cgeodetail extends AbstractActivity { gcIcons.put("mystery", R.drawable.type_mystery); } - geocode = geocode.toUpperCase(); + if (null == geocode && cache.geocode.length() > 0) + { + geocode = cache.geocode; + } + + if (null == guid && cache.guid.length() > 0) + { + guid = cache.guid; + } - setTitle(geocode); + setTitle(cache.geocode.toUpperCase()); inflater = getLayoutInflater(); -- cgit v1.1