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);