aboutsummaryrefslogtreecommitdiffstats
path: root/main/src/cgeo/geocaching/ui/DirectionImage.java
diff options
context:
space:
mode:
authorcampbeb <bpcampbell@gmail.com>2013-05-27 17:17:20 -1000
committercampbeb <bpcampbell@gmail.com>2013-05-27 17:17:20 -1000
commit95192007107fa24b80b06fbed4b9465e957f46a0 (patch)
tree48c1162eb52aa09f28a89f5ce0752d9760416622 /main/src/cgeo/geocaching/ui/DirectionImage.java
parentc5e318ecf3c55485cea834c969edc5c701d0b11f (diff)
downloadcgeo-95192007107fa24b80b06fbed4b9465e957f46a0.zip
cgeo-95192007107fa24b80b06fbed4b9465e957f46a0.tar.gz
cgeo-95192007107fa24b80b06fbed4b9465e957f46a0.tar.bz2
Direction Image fixes for Basic Members
Fixes some issues discovered while researching #2791
Diffstat (limited to 'main/src/cgeo/geocaching/ui/DirectionImage.java')
-rw-r--r--main/src/cgeo/geocaching/ui/DirectionImage.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/main/src/cgeo/geocaching/ui/DirectionImage.java b/main/src/cgeo/geocaching/ui/DirectionImage.java
index df7275d..9de360c 100644
--- a/main/src/cgeo/geocaching/ui/DirectionImage.java
+++ b/main/src/cgeo/geocaching/ui/DirectionImage.java
@@ -3,6 +3,8 @@ package cgeo.geocaching.ui;
import cgeo.geocaching.StoredList;
import cgeo.geocaching.network.HtmlImage;
+import org.apache.commons.lang3.StringUtils;
+
import android.graphics.drawable.BitmapDrawable;
public class DirectionImage {
@@ -16,7 +18,7 @@ public class DirectionImage {
* @return a drawable with the arrow pointing into the right direction
*/
public static BitmapDrawable getDrawable(final String directionCode) {
- return htmlImage.getDrawable("http://www.geocaching.com/images/icons/compass/" + directionCode + ".gif");
+ return StringUtils.isNotBlank(directionCode) ? htmlImage.getDrawable("http://www.geocaching.com/images/icons/compass/" + directionCode + ".gif") : null;
}
}