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

Commit 76c9ec4b authored by Costin Manolache's avatar Costin Manolache
Browse files

Part of Bug 2163087 fix - NPE if the main thread is removing the reference.

parent 8debb14b
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -2101,8 +2101,13 @@ public class ContactsListActivity extends ListActivity implements
                            break;
                        }

                        Bitmap photo = mBitmapCache.get(photoId).get();
                        SoftReference<Bitmap> photoRef = mBitmapCache.get(photoId);
                        if (photoRef == null) {
                            break;
                        }
                        Bitmap photo = photoRef.get();
                        if (photo == null) {
                            mBitmapCache.remove(photoId);
                            break;
                        }