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
1 changed files with 6 additions and 1 deletions

View File

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