mirror of
https://github.com/SimpleMobileTools/Simple-Calendar.git
synced 2025-01-31 02:44:57 +01:00
add a null check to dayfragment
This commit is contained in:
parent
dfa8f739e9
commit
711736cbeb
@ -124,6 +124,9 @@ class DayFragment : Fragment(), DBHelper.DBOperationsListener, AdapterView.OnIte
|
||||
private fun updateEvents(events: MutableList<Event>) {
|
||||
mEvents = ArrayList(events)
|
||||
val eventsToShow = getEventsToShow(events)
|
||||
if (activity == null)
|
||||
return
|
||||
|
||||
val eventsAdapter = EventsAdapter(activity.baseContext, eventsToShow)
|
||||
mHolder.day_events.apply {
|
||||
adapter = eventsAdapter
|
||||
|
Loading…
x
Reference in New Issue
Block a user