[Hotfix] Fix null cast exception in timetable day fragment.

This commit is contained in:
Kacper Ziubryniewicz 2019-12-22 20:44:41 +01:00
parent e85d6fbc3b
commit d67c2a90b1

View File

@ -158,8 +158,8 @@ class TimetableDayFragment : Fragment(), CoroutineScope {
}
// clear the root view and add the ScrollView
(view as FrameLayout).removeAllViews()
(view as FrameLayout).addView(dayScroll)
(view as FrameLayout?)?.removeAllViews()
(view as FrameLayout?)?.addView(dayScroll)
// Inflate a label view for each hour the day view will display
val hourLabelViews = ArrayList<View>()