From 110aba72bd41a13a1b25ea04264a8798a4784e6c Mon Sep 17 00:00:00 2001 From: Will Brode Date: Wed, 4 Sep 2024 22:38:48 -0700 Subject: [PATCH] Avoid deadlock in button renderer by aquiring read lock twice. --- widget/button.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/widget/button.go b/widget/button.go index 62ccad2a37..c508bc0013 100644 --- a/widget/button.go +++ b/widget/button.go @@ -393,7 +393,7 @@ func (r *buttonRenderer) padding(th fyne.Theme) fyne.Size { // must be called with r.button.propertyLock RLocked func (r *buttonRenderer) updateIconAndText() { - if r.button.Icon != nil && r.button.Visible() { + if r.button.Icon != nil && !r.button.Hidden { icon := r.button.Icon if r.icon == nil { r.icon = canvas.NewImageFromResource(icon)