flavienlaurent/datetimepicker

Null Pointer in year list view

Opened this issue · 0 comments

This exception occurs when scrolling to the bottom of the years list view:

    java.lang.NullPointerException: Attempt to invoke virtual method 'int android.view.View.getBottom()' on a null object reference
        at com.fourmob.datetimepicker.date.YearPickerView.isAtBottom(YearPickerView.java:76)
        at com.fourmob.datetimepicker.date.YearPickerView.onScroll(YearPickerView.java:152)
        at android.widget.AbsListView.invokeOnItemScrollListener(AbsListView.java:1518)
        at android.widget.AbsListView.trackMotionScroll(AbsListView.java:5335)
        at android.widget.ListView.trackMotionScroll(ListView.java:1988)
        at android.widget.AbsListView$FlingRunnable.run(AbsListView.java:4853)
        at android.view.Choreographer$CallbackRecord.run(Choreographer.java:966)
        at android.view.Choreographer.doCallbacks(Choreographer.java:790)
        at android.view.Choreographer.doFrame(Choreographer.java:721)
        at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:951)
        at android.os.Handler.handleCallback(Handler.java:883)
        at android.os.Handler.dispatchMessage(Handler.java:100)
        at android.os.Looper.loop(Looper.java:214)
        at android.app.ActivityThread.main(ActivityThread.java:7356)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)

To reproduce, call setDateConstraints with a maximum date 10 years in the future.