Skip to content

Commit

Permalink
Add null check for nullable onDateClickListener
Browse files Browse the repository at this point in the history
  • Loading branch information
Uday Srinath committed Nov 17, 2017
1 parent c0682ff commit c92f4fd
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,9 @@ protected void onRestoreInstanceState(Parcelable state) {
Calendar calendar = getCalDate(lastSelectedDay);
update(calendar);
markDateAsSelected(lastSelectedDay);
onDateClickListener.onDateClick(lastSelectedDay);
if (onDateClickListener != null) {
onDateClickListener.onDateClick(lastSelectedDay);
}
}

super.onRestoreInstanceState(state);
Expand Down

0 comments on commit c92f4fd

Please sign in to comment.