diff --git a/app/src/main/java/com/amrdeveloper/turtle/ui/preview/TurtleCanvasView.kt b/app/src/main/java/com/amrdeveloper/turtle/ui/preview/TurtleCanvasView.kt index 98c3ef0..ff4106c 100644 --- a/app/src/main/java/com/amrdeveloper/turtle/ui/preview/TurtleCanvasView.kt +++ b/app/src/main/java/com/amrdeveloper/turtle/ui/preview/TurtleCanvasView.kt @@ -80,9 +80,8 @@ class TurtleCanvasView @JvmOverloads constructor( private lateinit var onRenderStopped: () -> Unit private lateinit var onRenderFinished: () -> Unit - override fun onDraw(canvas: Canvas?) { + override fun onDraw(canvas: Canvas) { super.onDraw(canvas) - canvas ?: return interpretInstructions(canvas) }