Skip to content

Commit

Permalink
And remove an unused lock that was never set
Browse files Browse the repository at this point in the history
  • Loading branch information
andydotxyz committed Jan 14, 2025
1 parent ea106df commit 6045e8f
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions internal/driver/common/canvas.go
Original file line number Diff line number Diff line change
Expand Up @@ -508,25 +508,20 @@ type activatableMenu interface {
type overlayStack struct {
internal.OverlayStack

propertyLock sync.RWMutex
renderCaches []*renderCacheTree
}

func (o *overlayStack) Add(overlay fyne.CanvasObject) {
if overlay == nil {
return
}
o.propertyLock.Lock()
defer o.propertyLock.Unlock()
o.add(overlay)
}

func (o *overlayStack) Remove(overlay fyne.CanvasObject) {
if overlay == nil || len(o.List()) == 0 {
return
}
o.propertyLock.Lock()
defer o.propertyLock.Unlock()
o.remove(overlay)
}

Expand Down

0 comments on commit 6045e8f

Please sign in to comment.