Skip to content

Commit

Permalink
Merge pull request #53 from udaysrinath/master
Browse files Browse the repository at this point in the history
Add null check for nullable onDateClickListener
  • Loading branch information
Jonatan E. Salas authored Nov 17, 2017
2 parents c0682ff + c92f4fd commit 1a1aa89
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 1a1aa89

Please sign in to comment.