shithub: mycel

Download patch

ref: 6bc55e8d3ac9cbc2a48229e5fb56706b1f33d477
parent: eeb069251719e5c5e23c018f59ca8b158b3afb13
author: Philip Silva <philip.silva@protonmail.com>
date: Sun Dec 12 10:52:36 EST 2021

Additional nil check

--- a/browser/duitx/place.go
+++ b/browser/duitx/place.go
@@ -61,7 +61,7 @@
 }
 
 func (ui *Place) Draw(dui *duit.DUI, self *duit.Kid, img *draw.Image, orig image.Point, m draw.Mouse, force bool) {
-	if self.Draw == duit.Clean {
+	if self.Draw == duit.Clean || ui == nil || len(ui.Kids) == 0 {
 		return
 	}
 	self.Draw = duit.Clean