~singpolyma/cheogram-android

4e1343e110f24ebcb03da747fa617f8c9d8efc28 — Stephen Paul Weber 2 months ago 48526fc 2.10.10-3
Fix NPE
1 files changed, 4 insertions(+), 2 deletions(-)

M src/main/java/eu/siacs/conversations/entities/Conversation.java
M src/main/java/eu/siacs/conversations/entities/Conversation.java => src/main/java/eu/siacs/conversations/entities/Conversation.java +4 -2
@@ 1318,8 1318,10 @@ public class Conversation extends AbstractEntity implements Blockable, Comparabl

        @Override
        public int getItemPosition(Object o) {
            if (o == mPager.getChildAt(0)) return PagerAdapter.POSITION_UNCHANGED;
            if (o == mPager.getChildAt(1)) return PagerAdapter.POSITION_UNCHANGED;
            if (mPager != null) {
                if (o == mPager.getChildAt(0)) return PagerAdapter.POSITION_UNCHANGED;
                if (o == mPager.getChildAt(1)) return PagerAdapter.POSITION_UNCHANGED;
            }

            int pos = sessions == null ? -1 : sessions.indexOf(o);
            if (pos < 0) return PagerAdapter.POSITION_NONE;