Skip to content

Commit

Permalink
Merge pull request #5115 from williambrode/issue-5114
Browse files Browse the repository at this point in the history
Avoid deadlock in button renderer by aquiring read lock twice.
  • Loading branch information
dweymouth authored Sep 5, 2024
2 parents 5fb3d75 + 110aba7 commit 367ea0a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion widget/button.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 367ea0a

Please sign in to comment.