diff --git a/app/src/main/kotlin/com/simplemobiletools/launcher/views/HomeScreenGrid.kt b/app/src/main/kotlin/com/simplemobiletools/launcher/views/HomeScreenGrid.kt index 4180b12..1e97b52 100644 --- a/app/src/main/kotlin/com/simplemobiletools/launcher/views/HomeScreenGrid.kt +++ b/app/src/main/kotlin/com/simplemobiletools/launcher/views/HomeScreenGrid.kt @@ -510,8 +510,12 @@ class HomeScreenGrid(context: Context, attrs: AttributeSet, defStyle: Int) : Rel private fun getFakeHeight() = height - sideMargins.top - sideMargins.bottom @SuppressLint("DrawAllocation") - override fun onDraw(canvas: Canvas) { + override fun onDraw(canvas: Canvas?) { super.onDraw(canvas) + if (canvas == null) { + return + } + if (cellXCoords.isEmpty()) { fillCellSizes() }