From 868b6fdfe9cdf1fad92292930554e62309f4bdb3 Mon Sep 17 00:00:00 2001 From: "sashakoshka@tebibyte.media" Date: Mon, 24 Jun 2024 18:43:54 -0400 Subject: [PATCH] Fix crash when CanvasBox draws with nil canvas --- internal/system/canvasbox.go | 1 + 1 file changed, 1 insertion(+) diff --git a/internal/system/canvasbox.go b/internal/system/canvasbox.go index c88b3e3..d63de6c 100644 --- a/internal/system/canvasbox.go +++ b/internal/system/canvasbox.go @@ -29,6 +29,7 @@ func (this *canvasBox) Invalidate () { } func (this *canvasBox) Draw (can canvas.Canvas) { + if can == nil { return } this.box.Draw(can) if this.userDrawer != nil { this.userDrawer.Draw (