From e05f78ce8561aa8dd5b8002451a813cdbab799f6 Mon Sep 17 00:00:00 2001 From: misaochan Date: Wed, 3 Feb 2016 16:01:10 +1300 Subject: [PATCH] Handle caching --- .../fr/free/nrw/commons/upload/ShareActivity.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/commons/src/main/java/fr/free/nrw/commons/upload/ShareActivity.java b/commons/src/main/java/fr/free/nrw/commons/upload/ShareActivity.java index d82c1a109..7bae66c1f 100644 --- a/commons/src/main/java/fr/free/nrw/commons/upload/ShareActivity.java +++ b/commons/src/main/java/fr/free/nrw/commons/upload/ShareActivity.java @@ -205,11 +205,14 @@ public class ShareActivity if (decimalCoords != null) { - double decLongitude = imageObj.getDecLongitude(); - double decLatitude = imageObj.getDecLatitude(); - Log.d(TAG, "Decimal coords of image: " + decimalCoords); - app.cacheData.setQtPoint(decLongitude, decLatitude); + + //Only set cache for this point if image has coords + if (imageObj.imageCoordsExists) { + double decLongitude = imageObj.getDecLongitude(); + double decLatitude = imageObj.getDecLatitude(); + app.cacheData.setQtPoint(decLongitude, decLatitude); + } MwVolleyApi apiCall = new MwVolleyApi(this);