Fix crash when CanvasBox draws with nil canvas

This commit is contained in:
Sasha Koshka 2024-06-24 18:43:54 -04:00
parent 1c803ff9c1
commit 868b6fdfe9

View File

@ -29,6 +29,7 @@ func (this *canvasBox) Invalidate () {
} }
func (this *canvasBox) Draw (can canvas.Canvas) { func (this *canvasBox) Draw (can canvas.Canvas) {
if can == nil { return }
this.box.Draw(can) this.box.Draw(can)
if this.userDrawer != nil { if this.userDrawer != nil {
this.userDrawer.Draw ( this.userDrawer.Draw (