catch exceptions at fetching photo gps coordinates

This commit is contained in:
tibbi 2019-12-02 10:22:55 +01:00
parent b5f72faf2d
commit 8e8f23e6d1

View file

@ -102,7 +102,12 @@ abstract class ViewPagerFragment : Fragment() {
private fun getLatLonAltitude(path: String): String { private fun getLatLonAltitude(path: String): String {
var result = "" var result = ""
val exif = ExifInterface(path) val exif = try {
ExifInterface(path)
} catch (e: Exception) {
return ""
}
val latLon = FloatArray(2) val latLon = FloatArray(2)
if (exif.getLatLong(latLon)) { if (exif.getLatLong(latLon)) {