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

Unverified Commit a3e0f17c authored by Marvin W.'s avatar Marvin W. 🐿️
Browse files

Maps: Fix crash on race condition when unregistering bitmap descriptor

parent f8c47b3c
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -89,15 +89,15 @@ object BitmapDescriptorFactoryImpl : IBitmapDescriptorFactoryDelegate.Stub() {

        for (map in maps) {
            map.getStyle {
                try {
                runOnMainLooper {
                    try {
                        it.removeImage(id)
                    }
                    } catch (e: Exception) {
                        Log.w(TAG, e)
                    }
                }
            }
        }

        refCount.remove(id)
    }