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

Commit 83ed4fe1 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)

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

Change-Id: I6821448a5831c83c0931eb7bb0ef4c3f1a47247f
parent 881c6d57
Loading
Loading
Loading
Loading
+27 −25
Original line number Diff line number Diff line
@@ -1488,6 +1488,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) {
@@ -1517,6 +1518,7 @@ public class CalendarView extends FrameLayout {
                    }
                    setMonthDisplayed(firstDay);
                }
            }
            mPreviousScrollPosition = currScroll;
            mPreviousScrollState = mCurrentScrollState;
        }