adding a crashfix

This commit is contained in:
tibbi 2022-10-25 18:13:35 +02:00
parent 980d75a30f
commit 1190c5de2b
1 changed files with 5 additions and 1 deletions

View File

@ -510,8 +510,12 @@ class HomeScreenGrid(context: Context, attrs: AttributeSet, defStyle: Int) : Rel
private fun getFakeHeight() = height - sideMargins.top - sideMargins.bottom private fun getFakeHeight() = height - sideMargins.top - sideMargins.bottom
@SuppressLint("DrawAllocation") @SuppressLint("DrawAllocation")
override fun onDraw(canvas: Canvas) { override fun onDraw(canvas: Canvas?) {
super.onDraw(canvas) super.onDraw(canvas)
if (canvas == null) {
return
}
if (cellXCoords.isEmpty()) { if (cellXCoords.isEmpty()) {
fillCellSizes() fillCellSizes()
} }