jonathantribouharet / JTCalendar

A customizable calendar view for iOS.
MIT License
2.76k stars 531 forks source link

BugFix: Crash in prepareMenuItemView when a nil NSDate is passed in. #380

Closed bdunay3 closed 5 years ago

bdunay3 commented 5 years ago

We keep hitting a crash in our app store build where the delegate method calendar:prepareMenuItemView:date: of JTCalendarDelegate is called. I believe what is happening is that either a nil pointer for either menuItemView or date is being passed in, or either of those two pointers is actually NSNULL. In both cases, the Swift runtime would not like that. This should check for that condition.

Please note, I have not been able to reproduce this locally, but based on the crash log it's the only explanation I can think of that would cause the crash.