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

Commit 6f279627 authored by Adam Cohen's avatar Adam Cohen
Browse files

Fixing null pointer exception

Change-Id: I902dfc9baa1be7fb07110ccde7a3c0e0049e4417
parent 5b9895c0
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -345,8 +345,10 @@ public abstract class AdapterViewAnimator extends AdapterView<Adapter>
        if (relativeIndex >= 0 && relativeIndex <= mNumActiveViews - 1 && mAdapter != null) {
            int adapterCount =  mAdapter.getCount();
            int i = modulo(mCurrentWindowStartUnbounded + relativeIndex, adapterCount);
            if (mViewsMap.get(i) != null) {
                return mViewsMap.get(i).view;
            }
        }
        return null;
    }