diff options
author | Iván Ávalos <avalos@disroot.org> | 2022-01-18 00:40:50 -0600 |
---|---|---|
committer | Iván Ávalos <avalos@disroot.org> | 2022-01-18 00:40:50 -0600 |
commit | e1f3bee440c053b3d3591089a7cd08579de4f0d5 (patch) | |
tree | 2fd04c87d60c0e464968ad37bffca1b77da68841 /androidApp/src/main | |
parent | 5b6ad3dd226c28475a657638b6d883c72aca2255 (diff) | |
parent | 9f42e2777fc2dc2b6231f559fd544247f9f2c334 (diff) | |
download | etbsa-trackermap-mobile-e1f3bee440c053b3d3591089a7cd08579de4f0d5.tar.gz etbsa-trackermap-mobile-e1f3bee440c053b3d3591089a7cd08579de4f0d5.tar.bz2 etbsa-trackermap-mobile-e1f3bee440c053b3d3591089a7cd08579de4f0d5.zip |
Merge branch 'main' of https://git.sr.ht/~avalos/trackermap-mobile
Diffstat (limited to 'androidApp/src/main')
-rw-r--r-- | androidApp/src/main/java/mx/trackermap/TrackerMap/android/map/UnitMapFragment.kt | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/androidApp/src/main/java/mx/trackermap/TrackerMap/android/map/UnitMapFragment.kt b/androidApp/src/main/java/mx/trackermap/TrackerMap/android/map/UnitMapFragment.kt index e64afd3..9718262 100644 --- a/androidApp/src/main/java/mx/trackermap/TrackerMap/android/map/UnitMapFragment.kt +++ b/androidApp/src/main/java/mx/trackermap/TrackerMap/android/map/UnitMapFragment.kt @@ -130,6 +130,9 @@ class UnitMapFragment : Fragment() { Log.d("UnitMapFragment", "Loading layer!") mapFragment.updateLayer(type) unitsViewModel.selectedUnit.value?.let { + if (it.position == null || it.position?.latitude == null || it.position?.longitude == null) { + return@let + } unitsViewModel.moveCamera( UnitsViewModel.Camera( point = Point2d( |