adding a crashfix at setting up alarms
This commit is contained in:
parent
bed212fba9
commit
329560d21e
|
@ -66,7 +66,7 @@ class AlarmFragment : Fragment(), ToggleAlarmInterface {
|
|||
}
|
||||
|
||||
private fun setupAlarms() {
|
||||
alarms = context!!.dbHelper.getAlarms()
|
||||
alarms = context?.dbHelper?.getAlarms() ?: return
|
||||
val currAdapter = view.alarms_list.adapter
|
||||
if (currAdapter == null) {
|
||||
AlarmsAdapter(activity as SimpleActivity, alarms, this, view.alarms_list) {
|
||||
|
|
Loading…
Reference in New Issue