Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 99d5e099 authored by Jonathan Klee's avatar Jonathan Klee Committed by Marvin W.
Browse files

Make sure no callbacks are called when GoogleMap is destroyed

We faced an IllegalStateException related to a null root view of
a fragment layout.

If the GoogleMap is destroyed, there is no need to call the callbacks
related to it in an upcoming future.
parent bcded2c7
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -804,6 +804,7 @@ class GoogleMapImpl(context: Context, var options: GoogleMapOptions) : AbstractG
    override fun onPause() = mapView?.onPause() ?: Unit
    override fun onDestroy() {
        Log.d(TAG, "destroy");
        userOnInitializedCallbackList.clear()
        lineManager?.onDestroy()
        lineManager = null
        fillManager?.onDestroy()