diff --git a/features/location/impl/src/main/kotlin/io/element/android/features/location/impl/send/SendLocationView.kt b/features/location/impl/src/main/kotlin/io/element/android/features/location/impl/send/SendLocationView.kt index 5fa5010084..1a30c996a8 100644 --- a/features/location/impl/src/main/kotlin/io/element/android/features/location/impl/send/SendLocationView.kt +++ b/features/location/impl/src/main/kotlin/io/element/android/features/location/impl/send/SendLocationView.kt @@ -133,7 +133,10 @@ fun SendLocationView( ) ) }, - modifier = Modifier.clickable { + modifier = Modifier.clickable( + // target is null when the map hasn't loaded (or api key is wrong) so we disable the button + enabled = cameraPositionState.position.target != null + ) { state.eventSink( SendLocationEvents.SendLocation( cameraPosition = SendLocationEvents.SendLocation.CameraPosition(