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

Unverified Commit 4a2b5cb6 authored by Fynn Godau's avatar Fynn Godau Committed by Marvin W.
Browse files

Fix crash with mutated callback list

parent b3032b94
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -346,8 +346,9 @@ class LiteGoogleMapImpl(context: Context, var options: GoogleMapOptions) : Abstr
            )
            map.setImageBitmap(it.bitmap)

            for (callback in afterNextDrawCallback) callback()
            afterNextDrawCallback.clear()
            ArrayList(afterNextDrawCallback)
                .also { afterNextDrawCallback.clear() }
                .forEach { it() }

            if (cameraPositionChanged) {
                // Notify apps that new projection is now available