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

Commit 25d9ce40 authored by Fabrice Di Meglio's avatar Fabrice Di Meglio
Browse files

Fix bug #12066726 java.lang.NullPointerException at...

Fix bug #12066726 java.lang.NullPointerException at android.widget.CalendarView.onScroll(CalendarView.java:1216) - DO NOT MERGE

- fix the NPE by checking the validity of the child reference retrieved by View.getChildAt(...)

Change-Id: I61b9233345a4f1110aa06ea563a81dcdf6b35783
parent 0bfbb676
Loading
Loading
Loading
Loading
+28 −25
Original line number Diff line number Diff line
@@ -1210,6 +1210,7 @@ public class CalendarView extends FrameLayout {
            child = (WeekView) view.getChildAt(offset);
        }

        if (child != null) {
            // Find out which month we're moving into
            int month;
            if (mIsScrollingUp) {
@@ -1239,6 +1240,8 @@ public class CalendarView extends FrameLayout {
                }
                setMonthDisplayed(firstDay);
            }
        }

        mPreviousScrollPosition = currScroll;
        mPreviousScrollState = mCurrentScrollState;
    }