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

Commit 2972350f authored by Jay Shrauner's avatar Jay Shrauner
Browse files

Fix potential NPE in saveHorizontalOffsets

Fix potential NPE in saveHorizontalOffsets.

Bug:12031506
Change-Id: I713fed5995356bdaaf93186454dcc53b92cb75ec
(cherry picked from commit d0aa0f6f)
parent b0b153f5
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -453,8 +453,11 @@ public class PhoneFavoriteFragment extends Fragment implements OnItemClickListen
    }

    private void saveHorizontalOffsets(ContactTileRow row, ArrayList<ContactEntry> list) {
        for (int i = 0; i < list.size(); i++) {
        for (int i = 0; i < list.size() && i < row.getChildCount(); i++) {
            final View child = row.getChildAt(i);
            if (child == null) {
                continue;
            }
            final ContactEntry entry = list.get(i);
            final long itemId = mContactTileAdapter.getAdjustedItemId(entry.id);
            if (DEBUG) {