fix: prevent crash if no geopath is provided

This commit is contained in:
LavaDesu 2025-04-30 00:14:57 +10:00
parent 515beefca6
commit b6deb30fcf
Signed by: cilly
GPG key ID: 6500251E087653C9

View file

@ -147,8 +147,8 @@ fun App() {
polylines.add(Polyline(polyline, colour))
}
}
val bounds = buildBounds(allPoints)
newCameraPosition = Pair(Point(0.0, 0.0), bounds)
if (allPoints.isNotEmpty())
newCameraPosition = Pair(Point(0.0, 0.0), buildBounds(allPoints))
}
var sheetSwipeEnabled by remember { mutableStateOf(true) }