Skip to content

Commit

Permalink
HMS Maps: Fix NullPointerException caused by idle listener (#2603)
Browse files Browse the repository at this point in the history
Co-authored-by: Marvin W <[email protected]>
  • Loading branch information
DaVinci9196 and mar-v-in authored Nov 16, 2024
1 parent 247f1db commit 94ba898
Showing 1 changed file with 2 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -535,14 +535,6 @@ class GoogleMapImpl(private val context: Context, var options: GoogleMapOptions)
override fun setCameraIdleListener(listener: IOnCameraIdleListener?) = afterInitialize {
Log.d(TAG, "onCameraIdle: successful")
cameraIdleListener = listener
it.setOnCameraIdleListener {
try {
Log.d(TAG, "setOnCameraIdleListener: ")
cameraIdleListener?.onCameraIdle()
} catch (e: Exception) {
Log.w(TAG, e)
}
}
}

override fun getTestingHelper(): IObjectWrapper? {
@@ -620,14 +612,14 @@ class GoogleMapImpl(private val context: Context, var options: GoogleMapOptions)
} catch (e: Exception) {
Log.w(TAG, e)
}
}
map.setOnCameraIdleListener {

try {
cameraIdleListener?.onCameraIdle()
} catch (e: Exception) {
Log.w(TAG, e)
}
}

map.setOnCameraMoveListener {
try {
cameraMoveListener?.onCameraMove()

0 comments on commit 94ba898

Please sign in to comment.