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

Commit a2f9090c authored by Maurice Chu's avatar Maurice Chu
Browse files

Fix regression when editing contacts

Put a null pointer check when determining whether
a photo already exists.

Bug: 6574706
Change-Id: I21bdbc162910715d5792308a7cb8abdd18bf2eda
parent 9006a566
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1644,7 +1644,7 @@ public class ContactEditorFragment extends Fragment implements
            final ValuesDelta values = entity.getValues();
            if (values.isVisible()) {
                final ValuesDelta primary = entity.getPrimaryEntry(Photo.CONTENT_ITEM_TYPE);
                if (primary.getAsByteArray(Photo.PHOTO) != null) {
                if (primary != null && primary.getAsByteArray(Photo.PHOTO) != null) {
                    countWithPicture++;
                } else {
                    final long rawContactId = values.getAsLong(RawContacts._ID);