fix: force close in the camera demo activity (#796)

map object was not initialized, and it caused a crash in the sample app
This commit is contained in:
Ali Shariat 2021-12-15 20:45:41 +03:30 committed by GitHub
parent a8d2281513
commit 56103f99e0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -104,6 +104,7 @@ class CameraDemoActivity :
// [END_EXCLUDE]
override fun onMapReady(googleMap: GoogleMap) {
map = googleMap
// return early if the map was not initialised properly
with(googleMap) {
setOnCameraIdleListener(this@CameraDemoActivity)