make dayfragment receiver context nullable

This commit is contained in:
tibbi 2017-07-06 21:37:13 +02:00
parent 35fdbed726
commit 935c499b95
1 changed files with 1 additions and 1 deletions

View File

@ -119,7 +119,7 @@ class DayFragment : Fragment(), DBHelper.EventUpdateListener, DeleteEventsListen
private fun receivedEvents(events: List<Event>) {
val sorted = ArrayList<Event>(events.sortedWith(compareBy({ it.startTS }, { it.endTS }, { it.title }, { it.description })))
val filtered = context.getFilteredEvents(sorted)
val filtered = context?.getFilteredEvents(sorted) ?: ArrayList<Event>()
activity?.runOnUiThread {
updateEvents(filtered)