diff --git a/container.go b/container.go index 111b216e8d..50cc6d083c 100644 --- a/container.go +++ b/container.go @@ -168,7 +168,6 @@ func (c *Container) Refresh() { // It is much more efficient to call RemoveAll() instead. func (c *Container) Remove(rem CanvasObject) { c.lock.Lock() - if len(c.Objects) == 0 { c.lock.Unlock() return diff --git a/widget/icon.go b/widget/icon.go index f88a1a9e60..bb222cd272 100644 --- a/widget/icon.go +++ b/widget/icon.go @@ -34,6 +34,10 @@ func (i *iconRenderer) Refresh() { i.image.propertyLock.RLock() i.raster.Resource = i.image.Resource i.image.cachedRes = i.image.Resource + + if i.image.Resource == nil { + i.raster.Image = nil // reset the internal caching too... + } i.image.propertyLock.RUnlock() i.raster.Refresh()